TLDR; To use it with the pipe (|>) operator.
Here is the signature for Task.andThen:
import Task exposing (andThen)| module MagicJson exposing (encode, decode, decoder) | |
| import Json.Encode as Encode exposing (Value) | |
| import Json.Decode as Decode exposing (Decoder) | |
| import Http | |
| encode : a -> Value | |
| encode jsonEncodeElmValue = |
| module Test where | |
| import Text (asText) | |
| import Array (Array, get) | |
| import Json.Decode (..) | |
| import Maybe (..) | |
| type alias Foo = | |
| { foo : String | |
| , bar : Bar |
| import Dict | |
| -- The transformation function | |
| listToDict : (a -> comparable) -> [a] -> Dict.Dict comparable a | |
| listToDict getKey values = Dict.fromList (map (\v -> (getKey v, v)) values) | |
| -- Demo type | |
| type FooBar = | |
| { foo : String | |
| , bar : Int |
| interface Functor<A>{ | |
| flatMap<A,B> (f: (A) => B): Functor<B> | |
| } | |
| interface Monad<A> extends Functor<A> { | |
| bind: (A) => Monad<A> | |
| } | |
| interface Option<A> extends Monad<A>{ | |
| } |
| ### Keybase proof | |
| I hereby claim: | |
| * I am warry on github. | |
| * I am warry (https://keybase.io/warry) on keybase. | |
| * I have a public key whose fingerprint is E875 F7BA 4FB3 FE3A E55B 8E48 91FA 985A B75E 490A | |
| To claim this, I am signing this object: |
We'll take the stylus plugin as an exemple.
To make our plugin to work with node, we are going to use Christopher's js-transpiler. It allows to develop a shell script that will work independtly on both node and the jvm. You can call a shell script from the cli like this:
node my-shell.js file.extension '{"flag":true}'
You can use this to debug your processor until it works!
| Todos = | |
| # public properties | |
| list: OOO.observableArray([]) | |
| # public methods | |
| counter: OOO.computed ()-> | |
| @list.length + " remaining todos" | |
| clear: ()-> | |
| @list.remove (_)-> _.done |