codesnippets:compositionoperator
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| codesnippets:compositionoperator [2021/04/07 16:52] – created f2b216 | codesnippets:compositionoperator [2025/10/08 00:48] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 17: | Line 17: | ||
| f1 ch = toInteger $ Ch.ord(ch) | f1 ch = toInteger $ Ch.ord(ch) | ||
| - | f2 :: Integer -> (Integer, | + | f2 :: Integer -> Double |
| - | f2 n = (n, fromIntegral n :: Double) | + | f2 n = fromIntegral n :: Double |
| - | f3 :: Char -> (Integer, | + | f3 :: Char -> Double |
| f3 = f2 . f1 | f3 = f2 . f1 | ||
| - | f4 :: Char -> (Integer, | + | f4 :: Char -> Double |
| - | f4 ch = f2 (f1 ch) | + | f4 ch = f2 (f1 ch)</ |
| + | * executes with output:< | ||
| + | 97.0 | ||
| + | 97.0 | ||
| </ | </ | ||
| + | |||
| + | |||
| + | ===== ✎ ===== | ||
| + | ~~DISCUSSION~~ | ||
codesnippets/compositionoperator.1617807148.txt.gz · Last modified: (external edit)
