|
|
|
|
|
by jeremyjh
1802 days ago
|
|
I agree Clojure has a better REPL experience than Elixir. But in Elixir REPL for a quick and dirty function you'd probably just do >bar = fn x -> x + 1 end
The most unfortunate thing though is then you have to have a different calling convention. Its the greatest flaw in Elixir by far but they didn't have a reasonable alternative given the constraints of Erlang.Still for defining a named function in the REPL its the same in Haskell and most other languages I believe that you can't define a new named function or add a function to a module in the REPL, though at least in Haskell the calling convention for a variable bound to a lambda is the same as for a named top-level function. LISPs have always had a different notion of how the REPL integrates into the development experience of a running program, and I don't think its really been replicated elsewhere. |
|
bar = &(&1 + 1)