3 ms·
There's a lot of precise, technical language, including a specification - that seems very contentful and specific to me. The code examples seem very straightfo
by maxbond 2y ago
There's a lot of precise, technical language, including a specification - that seems very contentful and specific to me.
The code examples seem very straightforward and compelling to me.
> # Setup: Simple function on strings
> f = λa λb concat ["Hello ",a," ",b,"!"]
> f "Jane" "Doe"
Hello Jane Doe!
This requires some familiarity with languages like Lisp or Forth to follow, but otherwise it's very straightforward.
> # What else can we do with a function?
> g = f "Admiral"
> # Try to invert it:
> invert g "Hello Admiral
Alice!"
Alice
That's a really concise and impressive demo to me! I've never seen a language that can invert functions!
- bux93 2y ago> I've never seen a language that can invert functions! prolog