Files
mgmt/examples/lang/answer.mcl
James Shubin b0911c6d70 lang: funcs: simple: Don't block on simple, pure, static functions
I forgot to handle the special case of a function using this API that
received no inputs. It was waiting for the first input to come in, and
as a result was never producing any output.

Remember that functions like this should *almost* be thought of as
constants of the system. You would expect their output to never change
during the lifetime of a particular program invocation.
2018-02-22 19:26:18 -05:00

5 lines
180 B
Plaintext

# it was a lovely surprise to me, when i realized that mgmt had the answer!
print "answer" {
msg => printf("the answer to life, the universe, and everything is: %d", answer()),
}