robrix / Prelude

Swift µframework of simple functional programming tools
MIT License
409 stars 26 forks source link

Why there is no fst, snd? #47

Closed nikita-leonov closed 8 years ago

nikita-leonov commented 8 years ago

Thanks for the work so far! It helps a lot. We were writing our own prelude, but it seems redundant when this uframework in place.

In our implementation we have fst & snd for tuple unwraps. It known Haskell functions that allows to avoid in place anonymous functions like { $0 } or { $0.0 } etc. We have a code guidelines to prefer functions & functions compositions in our code instead of closures. It would be great to have such functions in Prelude. What do you think? I can provide PR if proposal sounds reasonable.

nikita-leonov commented 8 years ago

@robrix hm, I just noticed #44. Is it the same proposal? I am not sure that I understand description of it clearly :)

robrix commented 8 years ago

Yep, this is a duplicate of #44. A PR would be welcomed!