← Back to context

Comment by Zambyte

13 hours ago

Closures and fexprs

Well a closure is a kind of a record with a function hiding inside it and a record is a function which returns its contents.

An fexpr is a function.

  • If you extend the definition of functions to include state, sure, closures are functions. It would be more correct to call them procedures though, which are a superset of functions and operators with side effects.

    > An fexpr is a function.

    Try to implement a short circuiting logical `and` operator as a function :-)