My adventure with
SCORE 42
by Yan Cui
ELM
@theburningmonk
start of my ELM journey
things have
moved
on…
The Elm Architecture
remember Day 1?
state
Msg
update
init
new state
- every Erlang programmer
side-effects!
state
Msg
update
init
new state
Msg
state
Msg
update
init
subscriptions
Msgnew state
Msg
state
Msg
update
init
subscriptions
Msgnew state
view
Msg
state
Msg
update
init
subscriptions
Msgnew state
view
Msg
Msg
state
Msg
update
init
subscriptions
Msgnew state
view
Msg
Msg
@theburningmonk
x = { age=42, name=“foo” }
@theburningmonk
-- clone and updatey = { x | name = "bar" }
@theburningmonk
type alias Character = { age : Int, name : String }
@theburningmonk
type Tree = | Leaf| Branch Tree
@theburningmonk
Demo
8 segments
direction
change
changeno changenot allowed
directionw
a s d
direction
direction
direction
direction
direction
cherry
direction
YUM YUM YUM!
direction
+1 segment
@theburningmonk
Demo
@theburningmonktheburningmonk.comgithub.com/theburningmonk