Sky - A toolkit for transforming functions in elixir

Hello there.

Sky is a set of functions, operators and macros for dealing with functions.

Those of us who work with elixir are used to transform data through a pipeline of functions. It is a very intuitive and powerful way to work.

But functions are data too. Why no transform them to fit our needs as we see fit?

Feedback and criticism (or better, contributions!) are more than welcome.

Github repo
Hex package
Online documentation

6 Likes

This looks really neat! I think this would make composing functions in Elixir easier to work with. I really like the features of Sky.Ext. I’m not sure if I dig the syntax ~> and <~, but just as almost everything else I might come to like it later :slight_smile:

Thanks a lot! If you feel like using it that would be great. Only through use the API can improve, specially with functions like Sky.lift_ok/1 or Sky.apply_if/2, where I’m not sure if they provide a consistent, obvious behavior.

The ~> operator can certainly improve, or alternatively, an overriden |> operator can be added, but that might feel too aggressive. What do you think about that?

The <~ was more of a why not? approach, and I guess in case someone prefers a traditional, haskell style composition syntax (I don’t, but hey, I don’t judge).