|
|
|
|
|
by Gabriel439
3180 days ago
|
|
Your program can be a pure function which somebody else can invoke, so it's not necessarily a constant However, Dhall does have the ability to normalize under lambda when possible so it will actually do this for you if it can! For example, if you try to interpret this program, which is a function: let replicate = https://ipfs.io/ipfs/QmQ8w5PLcsNz56dMvRtq54vbuPe9cNnCCUXAQp6xLc6Ccx/Prelude/List/replicate
in let exclaim = λ(t : Text) → t ++ "!"
in λ(x : Text) → replicate +3 Text (exclaim x)
The interpreter will simplify that down to: λ(x : Text) → [x ++ "!", x ++ "!", x ++ "!"] : List Text
... although it can't do anything else until somebody else comes along later and calls the function on a specific input |
|