The "S" is for "spread".
As in, "spread" some argument with n maps over an n-ary function.
S is actually kind of cool, and some people may find it genuinely useful. Look at this:
type alias Permission =
{ canLogIn : Bool
, canSendInvite : Bool
, canReadActivityLogs : Bool
, canTeleport : Bool
}
isAdmin : Permission -> Bool
isAdmin =
S.s4 (\a b c d -> List.all [ a, b, c ] || d)
.canLogIn
.canSendInvite
.canReadActivityLogs
.canTeleportMaybe, that is not the greatest example - but sometimes we need to use one value as an input
to more than one intermediate value, and then operate on those intermediate values within the same
scope - you can do that with S.
spread the same arg with 3 maps over a three-arg function.
spread the same arg with 4 maps over a four-arg function.
spread the same arg with 5 maps over a five-arg function.
spread the same arg with 6 maps over a six-arg function.
spread the same arg with 7 maps over a seven-arg function.
spread the same arg with 8 maps over an eight-arg function.
spread the same arg with 9 maps over a nine-arg function.
spread the same arg with 10 maps over a ten-arg function.
spread the same arg with 11 maps over an eleven-arg function.
spread the same arg with 2 maps over a two-arg function.