on master help sign in
document defaultStyle, id -> identity
commit2ffc73d52617476c2e9acf417cbba1755079f37c authorMax Goldstein <maxgoldstein1@gmail.com> dateMon 29 Sep 2014, 11:15 (12 years ago) parentd5b227d
3 files changed+4−4
libraries/Array.elm+1−1 libraries/Graphics/Input.elm+1−1 libraries/Graphics/Input/Field.elm+2−2
libraries/Array.elm+1−1
@@ -30,7 +30,7 @@ data Array a = Array
3030{-| Initialize an array. `initialize n f` creates an array of length `n` with
3131the element at index `i` initialized to the result of `(f i)`.
3232
33− initialize 4 id == fromList [0,1,2,3]
33+ initialize 4 identity == fromList [0,1,2,3]
3434 initialize 4 (\n -> n*n) == fromList [0,1,4,9]
3535 initialize 4 (always 0) == fromList [0,0,0,0]
3636-}
libraries/Graphics/Input.elm+1−1
@@ -104,7 +104,7 @@ customButton = Native.Graphics.Input.customButton
104104
105105 boxes : Bool -> Element
106106 boxes checked =
107− let box = container 40 40 middle (checkbox check.handle id checked)
107+ let box = container 40 40 middle (checkbox check.handle identity checked)
108108 in flow right [ box, box, box ]
109109
110110 main : Signal Element
libraries/Graphics/Input/Field.elm+2−2
@@ -11,7 +11,7 @@ text fields programmatically.
1111@docs Content, Selection, Direction, noContent
1212
1313# Field Style
14−@docs Style, Outline, noOutline, Highlight, noHighlight, Dimensions, uniformly
14+@docs defaultStyle, Style, Outline, noOutline, Highlight, noHighlight, Dimensions, uniformly
1515-}
1616
1717import Color (Color)
@@ -140,7 +140,7 @@ to match what they have entered.
140140 name = input noContent
141141
142142 nameField : Signal Element
143− nameField = field defaultStyle name.handle id "Name" <~ name.signal
143+ nameField = field defaultStyle name.handle identity "Name" <~ name.signal
144144
145145When we use the `field` function, we first give it a visual style. This is
146146the first argument so that it is easier to define your own custom field