johnicello (8) [Avatar] Offline
With the Random.generate example in chapter 3, is it possible to execute the resulting Cmd in elm-repl?

The concept of Commands is new to me and you explained them well in chapter 3. However, it would be nice be able to actually generate the random numbers in the shell, using similar code (without resorting to seeds), using a union type like Msg.

> type Msg = Nothing | SelectByIndex Int
> import Random
> cmd = Random.generate SelectByIndex ( 0 2)

Can I somehow execute the 'cmd' manually in the shell?
rtfeldman (60) [Avatar] Offline
Hi John,

Unfortunately elm-repl is only for expressions, not for running commands. Sorry! smilie