From 0a32a8eeb98d5f3507edf5e303ae655f4b923c74 Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Thu, 2 Dec 2021 22:24:21 +0100 Subject: Updating the documentation to match changes in Fate. --- content/fate_v1/computations/lambda_functions/_index.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'content/fate_v1/computations/lambda_functions') diff --git a/content/fate_v1/computations/lambda_functions/_index.md b/content/fate_v1/computations/lambda_functions/_index.md index 35485a3..7992b54 100644 --- a/content/fate_v1/computations/lambda_functions/_index.md +++ b/content/fate_v1/computations/lambda_functions/_index.md @@ -7,17 +7,26 @@ corresponds to the function itself, the `eval` computation must be used to obtain the value that the function computes. ### DEFINITION -{{< fatecode >}}(lambda (([T0 = TYPE] {S0 = String}) ... ([TN = TYPE] {SN = String})) [COMPUTATION]){{< /fatecode >}} +{{< fatecode >}}(lambda + (([T0 = TYPE] {S0 = String}) ... ([TN = TYPE] {SN = String})) + [COMPUTATION] +){{< /fatecode >}} Returns a lambda function taking `S0` ... `SN` of types `T0` ... `TN` as arguments and evaluating to `[COMPUTATION]`. ### EVALUATION -{{< fatecode >}}(eval [REFERENCE] [C0 = COMPUTATION] ... [CN = COMPUTATION]){{< /fatecode >}} +{{< fatecode >}}(eval [LAMBDA O (C0 ... CN)] [C0 = COMPUTATION] ... [CN = COMPUTATION]){{< /fatecode >}} Returns the result of evaluating the lambda function at `[REFERENCE]` given the parameters `C0` ... `CN`. +### PARTIAL EVALUATION +{{< fatecode >}}(partial [LAMBDA O (C0 ... CN)] [C0 = COMPUTATION] ... [CM = COMPUTATION]){{< /fatecode >}} + +Returns a lambda function corresponding to the `[LAMBDA O (C0 ... CN)]` in which +the first M parameters have already been filled with `C0` ... `CM`. + ## Examples {{< fatecode >}}(lambda ( (int i) ) (+ (var i) 1) -- cgit v1.2.3-70-g09d2