Packages

FunLand adds Behaviours to define Algebraic Data Types ('Container' data types) to Elixir, such as Functors, Monoids and Monads.

Current section

Files

Jump to
fun_land lib fun_landic all.ex
Raw

lib/fun_landic/all.ex

defmodule FunLandic.All do
@moduledoc """
This Combinable can be used to combine a Reducable of boolean values, returning `true` if all of them are `true`.
Otherwise, `false` is returned.
Note that `All` is true for an empty Reducable.
"""
use FunLand.Combinable
def neutral, do: true
def combine(a, b), do: a && b
end