🎶 A collection of types and functions that enhance the Swift language. - swift-prelude/Sources/Optics at 8cb25510cd54be91d28f0466e37f337aca815b74 · pointfreeco/swift-prelude
🎬 The source for www.pointfree.co, a video series on functional programming and the Swift programming language. - Better exercise solutions (h/t @sharplet) · pointfreeco/pointfreeco@78fc3d1
We've seen that contramap is a powerful operation, but the name isn't fantastic. We propose a much more intuitive name for this operation, and in doing so make our code much easier to read.
“Free map functions express the nesting nicely: map: ((A) -> B) -> (Signal) -> Signal map: ((A) -> B) -> ([A]) -> [B] Then the nested map is function composition: (map < map): ((A) -> B) -> (Signal
“...and without the abstract episodes we’d be stuck in an endless loop of adding superficial niceties to our code that don’t meaningfully improve it in a significant way.”