gleamgen/function

Types

pub type Function(type_, ret) {
  Function(
    args: List(#(String, types.GeneratedType(Unchecked))),
    returns: types.GeneratedType(ret),
    body: expression.Expression(ret),
  )
}

Constructors

  • Function(
      args: List(#(String, types.GeneratedType(Unchecked))),
      returns: types.GeneratedType(ret),
      body: expression.Expression(ret),
    )

Functions

pub fn new0(
  returns returns: GeneratedType(a),
  handler handler: fn() -> Expression(a),
) -> Function(fn(b) -> a, a)
pub fn new1(
  arg1 arg1: #(String, GeneratedType(a)),
  returns returns: GeneratedType(b),
  handler handler: fn(Expression(a)) -> Expression(b),
) -> Function(fn(a) -> b, b)
pub fn new2(
  arg1 arg1: #(String, GeneratedType(a)),
  arg2 arg2: #(String, GeneratedType(b)),
  returns returns: GeneratedType(c),
  handler handler: fn(Expression(a), Expression(b)) ->
    Expression(c),
) -> Function(fn(a, b) -> c, c)
pub fn new3(
  arg1 arg1: #(String, GeneratedType(a)),
  arg2 arg2: #(String, GeneratedType(b)),
  arg3 arg3: #(String, GeneratedType(c)),
  returns returns: GeneratedType(d),
  handler handler: fn(Expression(a), Expression(b), Expression(c)) ->
    Expression(d),
) -> Function(fn(a, b, c) -> d, d)
pub fn new4(
  arg1 arg1: #(String, GeneratedType(a)),
  arg2 arg2: #(String, GeneratedType(b)),
  arg3 arg3: #(String, GeneratedType(c)),
  arg4 arg4: #(String, GeneratedType(d)),
  returns returns: GeneratedType(e),
  handler handler: fn(
    Expression(a),
    Expression(b),
    Expression(c),
    Expression(d),
  ) -> Expression(e),
) -> Function(fn(a, b, c, d) -> e, e)
pub fn new5(
  arg1 arg1: #(String, GeneratedType(a)),
  arg2 arg2: #(String, GeneratedType(b)),
  arg3 arg3: #(String, GeneratedType(c)),
  arg4 arg4: #(String, GeneratedType(d)),
  arg5 arg5: #(String, GeneratedType(e)),
  returns returns: GeneratedType(f),
  handler handler: fn(
    Expression(a),
    Expression(b),
    Expression(c),
    Expression(d),
    Expression(e),
  ) -> Expression(f),
) -> Function(fn(a, b, c, d, e) -> f, f)
pub fn new6(
  arg1 arg1: #(String, GeneratedType(a)),
  arg2 arg2: #(String, GeneratedType(b)),
  arg3 arg3: #(String, GeneratedType(c)),
  arg4 arg4: #(String, GeneratedType(d)),
  arg5 arg5: #(String, GeneratedType(e)),
  arg6 arg6: #(String, GeneratedType(f)),
  returns returns: GeneratedType(g),
  handler handler: fn(
    Expression(a),
    Expression(b),
    Expression(c),
    Expression(d),
    Expression(e),
    Expression(f),
  ) -> Expression(g),
) -> Function(fn(a, b, c, d, e, f) -> g, g)
pub fn new7(
  arg1 arg1: #(String, GeneratedType(a)),
  arg2 arg2: #(String, GeneratedType(b)),
  arg3 arg3: #(String, GeneratedType(c)),
  arg4 arg4: #(String, GeneratedType(d)),
  arg5 arg5: #(String, GeneratedType(e)),
  arg6 arg6: #(String, GeneratedType(f)),
  arg7 arg7: #(String, GeneratedType(g)),
  returns returns: GeneratedType(h),
  handler handler: fn(
    Expression(a),
    Expression(b),
    Expression(c),
    Expression(d),
    Expression(e),
    Expression(f),
    Expression(g),
  ) -> Expression(h),
) -> Function(fn(a, b, c, d, e, f, g) -> h, h)
pub fn new8(
  arg1 arg1: #(String, GeneratedType(a)),
  arg2 arg2: #(String, GeneratedType(b)),
  arg3 arg3: #(String, GeneratedType(c)),
  arg4 arg4: #(String, GeneratedType(d)),
  arg5 arg5: #(String, GeneratedType(e)),
  arg6 arg6: #(String, GeneratedType(f)),
  arg7 arg7: #(String, GeneratedType(g)),
  arg8 arg8: #(String, GeneratedType(h)),
  returns returns: GeneratedType(i),
  handler handler: fn(
    Expression(a),
    Expression(b),
    Expression(c),
    Expression(d),
    Expression(e),
    Expression(f),
    Expression(g),
    Expression(h),
  ) -> Expression(i),
) -> Function(fn(a, b, c, d, e, f, g, h) -> i, i)
pub fn new9(
  arg1 arg1: #(String, GeneratedType(a)),
  arg2 arg2: #(String, GeneratedType(b)),
  arg3 arg3: #(String, GeneratedType(c)),
  arg4 arg4: #(String, GeneratedType(d)),
  arg5 arg5: #(String, GeneratedType(e)),
  arg6 arg6: #(String, GeneratedType(f)),
  arg7 arg7: #(String, GeneratedType(g)),
  arg8 arg8: #(String, GeneratedType(h)),
  arg9 arg9: #(String, GeneratedType(i)),
  returns returns: GeneratedType(j),
  handler handler: fn(
    Expression(a),
    Expression(b),
    Expression(c),
    Expression(d),
    Expression(e),
    Expression(f),
    Expression(g),
    Expression(h),
    Expression(i),
  ) -> Expression(j),
) -> Function(fn(a, b, c, d, e, f, g, h, i) -> j, j)
pub fn to_unchecked(
  type_: Function(a, b),
) -> Function(Unchecked, Unchecked)
Search Document