How to define an function in the eshell (Erlang shell)?

Yes but it is painful. Below is a “lambda function declaration” (aka fun in Erlang terms).

1> F=fun(X) -> X+2 end.
%%⇒ #Fun <erl_eval.6.13229925>

Have a look at this post. You can even enter a module’s worth of declaration if you ever needed. In other words, yes you can declare functions.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)