Skip to content

Commit f299eff

Browse files
authored
Another example for const
1 parent e3504b2 commit f299eff

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Data/Function.purs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ flip f b a = f a b
2626
-- | ```purescript
2727
-- | const 1 "hello" = 1
2828
-- | ```
29+
-- |
30+
-- | Can also be thought of as creating a function that ignores its argument:
31+
-- |
32+
-- | ```purescript
33+
-- | const 1 == \_ -> 1
34+
-- | ```
2935
const :: forall a b. a -> b -> a
3036
const a _ = a
3137

0 commit comments

Comments
 (0)