Literals - - B o o l e a n T r u e : B o o l F a l s e : B o o l - - I n t o r F l o a t d e p e n d i n g o n u s a g e 4 2 : n u m b e r 3 . 1 4 : F l o a t ' a ' : C h a r " a b c " : S t r i n g - - m u l t i - l i n e S t r i n g " " " T h i s i s u s e f u l f o r h o l d i n g J S O N o r o t h e r c o n t e n t t h a t h a s " q u o t a t i o n m a r k s " . " " "
Conditionals i f p o w e r L e v e l > 9 0 0 0 t h e n " O V E R 9 0 0 0 ! ! ! " e l s e " m e h " - - O R i f k e y = = 4 0 t h e n n + 1 e l s e i f k e y = = 3 8 t h e n n - 1 e l s e n
Functions s a y H e l l o n a m e = S t r i n g . a p p e n d " H e l l o " n a m e - - f u n c t i o n : S t r i n g - > S t r i n g s a y H e l l o n a m e = \ S t r i n g . a p p e n d " H e l l o " n a m e - - f u n c t i o n : S t r i n g - > S t r i n g
Update t y p e A c t i o n = R e s e t | . . . u p d a t e : A c t i o n - > M o d e l - > M o d e l u p d a t e a c t i o n m o d e l = c a s e a c t i o n o f R e s e t - > . . . . . .
Pure functions - always return the same value given the same arguments, with no side-effects. In essence, the function must not depend on anything else besides the arguments, and it must not mutate anything.
Reactive - something that a component can start listening for, and react to the events as it pleases In Elm, these listenable things are signals. The component using a signal knows how to utilize it, but the signal has no knowledge of the component(s) that it is affecting.