Haskell : foldl
Input: foldl (/) 64 [4,2,4] Output: 2.0 Input: foldl (/) 3 [] Output: 3.0 Input: foldl max 5 [1,2,3,4] Output: 5 Input: foldl max 5 [1,2,3,4,5,6,7] Output: 7 Input: foldl (\x y -> 2*x + y) 4 [1,2,3] Output: 43
Haskell : foldl ZVON > References > Haskell reference Intro / Search / ZVON | Indexes | Syntax | >> Prelude << | Ratio | Complex | Numeric | Ix | Array | List | Maybe | Char | Monad | IO | Directory | System | Time | Locale | CPUTime | Random Module: Prelude Function: foldl Type: (a -> b -> a) -> a -> [b] -> a Description: it takes the second argument and the first item of the list and applies the function to them, then feeds the function with this result and the second argument and so on. See scanl for intermediate results. Related: foldl1 , foldr , foldr1 , scanl , scanl1 , scanr , scanr1 Ex
Explore this link on the map →related reading
- CSC 151 - Higher-order design, recursive and othereikmeier.sites.grinnell.edu
- Overview · ekmett/lens Wiki · GitHubgithub.com
- Monoids without tears | F# for fun and profitfsharpforfunandprofit.com
- Clean Coder Blogblog.cleancoder.com
- CSC 151 - The "big three" list operationseikmeier.sites.grinnell.edu
- 99 questions/1 to 10 - HaskellWikiwiki.haskell.org
- Starting Out - Learn You a Haskell for Great Good!learnyouahaskell.github.io
- Lambda calculus - Wikipediaen.wikipedia.org
- CSC 151 - Transforming listseikmeier.sites.grinnell.edu
- Colfcolf.dev
- Plus 2: Luyện đọc điền và đọc hiểu chuyên sâu (2024)ngoaingu24h.vn
- What is a Monad?lukechampine.com