How to print task value in elm-repl?

Let's say I created a simple task in elm-repl , for example:

 > forty = Task.succeed 40 <task> : Task.Task a number 

How to take my forty and ... use it? I can convert Task to Cmd with:

 > Task.perform (\x -> Nothing) (\a -> Just a) forty { type = "leaf", home = "Task", value = T <task> } : Platform.Cmd.Cmd (Maybe.Maybe Float) 

... but I'm not sure if this brings me closer to my goal, because I don’t know how to β€œforce” the command (for example, print its value on the screen).

+5
source share
1 answer

Elm REPL does not yet allow the execution of tasks. There is an open problem for this function request.

+5
source

All Articles