commit
37afd0d6a5
4 changed files with 6 additions and 6 deletions
|
@ -332,7 +332,7 @@ curry : ((a,b) -> c) -> a -> b -> c
|
||||||
curry f a b = f (a,b)
|
curry f a b = f (a,b)
|
||||||
|
|
||||||
{-| Change how arguments are passed to a function.
|
{-| Change how arguments are passed to a function.
|
||||||
This combines two arguments into a sigle pair.
|
This combines two arguments into a single pair.
|
||||||
-}
|
-}
|
||||||
uncurry : (a -> b -> c) -> (a,b) -> c
|
uncurry : (a -> b -> c) -> (a,b) -> c
|
||||||
uncurry f (a,b) = f a b
|
uncurry f (a,b) = f a b
|
|
@ -108,7 +108,7 @@ color c e = let p = e.props in
|
||||||
|
|
||||||
{-| Create an `Element` with a tag. This lets you link directly to it.
|
{-| Create an `Element` with a tag. This lets you link directly to it.
|
||||||
The element `(tag "all-about-badgers" thirdParagraph)` can be reached
|
The element `(tag "all-about-badgers" thirdParagraph)` can be reached
|
||||||
with a link lik this: `/facts-about-animals.elm#all-about-badgers`
|
with a link like this: `/facts-about-animals.elm#all-about-badgers`
|
||||||
-}
|
-}
|
||||||
tag : String -> Element -> Element
|
tag : String -> Element -> Element
|
||||||
tag name e = let p = e.props in
|
tag name e = let p = e.props in
|
||||||
|
|
|
@ -113,7 +113,7 @@ hoverables : a -> { events : Signal a,
|
||||||
hoverable : (Bool -> a) -> Element -> Element }
|
hoverable : (Bool -> a) -> Element -> Element }
|
||||||
hoverables = Native.Graphics.Input.hoverables
|
hoverables = Native.Graphics.Input.hoverables
|
||||||
|
|
||||||
{-| Detect when the mouse is hovering over a specifici `Element`. -}
|
{-| Detect when the mouse is hovering over a specific `Element`. -}
|
||||||
hoverable : Element -> (Element, Signal Bool)
|
hoverable : Element -> (Element, Signal Bool)
|
||||||
hoverable elem =
|
hoverable elem =
|
||||||
let pool = hoverables False
|
let pool = hoverables False
|
||||||
|
|
|
@ -3,7 +3,7 @@ module Signal where
|
||||||
`lift8` and infix lift operators `<~` and `~`, combinations, filters, and
|
`lift8` and infix lift operators `<~` and `~`, combinations, filters, and
|
||||||
past-dependence.
|
past-dependence.
|
||||||
|
|
||||||
Signals are time-varying values. Lifted functions are reevaluated whenver any of
|
Signals are time-varying values. Lifted functions are reevaluated whenever any of
|
||||||
their input signals has an event. Signal events may be of the same value as the
|
their input signals has an event. Signal events may be of the same value as the
|
||||||
previous value of the signal. Such signals are useful for timing and
|
previous value of the signal. Such signals are useful for timing and
|
||||||
past-dependence.
|
past-dependence.
|
||||||
|
@ -95,11 +95,11 @@ combine = foldr (Native.Signal.lift2 (::)) (Native.Signal.constant [])
|
||||||
-- fold over non-homogeneous inputs.
|
-- fold over non-homogeneous inputs.
|
||||||
-- mergeEither : Signal a -> Signal b -> Signal (Either a b)
|
-- mergeEither : Signal a -> Signal b -> Signal (Either a b)
|
||||||
|
|
||||||
{-| Count the number of events that have occured. -}
|
{-| Count the number of events that have occurred. -}
|
||||||
count : Signal a -> Signal Int
|
count : Signal a -> Signal Int
|
||||||
count = Native.Signal.count
|
count = Native.Signal.count
|
||||||
|
|
||||||
{-| Count the number of events that have occured that satisfy a given predicate.
|
{-| Count the number of events that have occurred that satisfy a given predicate.
|
||||||
-}
|
-}
|
||||||
countIf : (a -> Bool) -> Signal a -> Signal Int
|
countIf : (a -> Bool) -> Signal a -> Signal Int
|
||||||
countIf = Native.Signal.countIf
|
countIf = Native.Signal.countIf
|
||||||
|
|
Loading…
Reference in a new issue