Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "src/modules/utils/tuple"

Index

Type aliases

Thruple

Thruple<A, B, C>: [A, B, C]

Thruple. Array with 3 elements

Type parameters

  • A

  • B

  • C

Tuple

Tuple<A, B>: [A, B]

Tuple. Array with 2 elements.

Type parameters

  • A

  • B

Functions

Const applyToSecond

  • applyToSecond<A, B>(f: F<A, B>): (Anonymous function)
  • applyToSecond :: (a -> b) -> (t, a) -> (t, b)

    There's gotta be an official name for this. Applies function f to the second element in a tuple.

    Type parameters

    • A

    • B

    Parameters

    • f: F<A, B>

    Returns (Anonymous function)

Const first

  • first<A>(__namedParameters: []): A
  • first :: (a, b) -> a

    Type parameters

    • A

      The type of the first element in the tuple.

    Parameters

    • __namedParameters: []

    Returns A

    The first element in a tuple.

Const second

  • second<B>(__namedParameters: [undefined]): B
  • Returns the second element in a tuple.

    second :: ( (a, b) -> b)

    Type parameters

    • B

    Parameters

    • __namedParameters: [undefined]

    Returns B

Const thirst

  • thirst<A>(__namedParameters: []): A
  • thirst :: (a, b, c) -> a

    Returns the first element in a thruple.

    Type parameters

    • A

    Parameters

    • __namedParameters: []

    Returns A

Const threcond

  • threcond<B>(__namedParameters: [undefined]): B

Const thruple

  • thruple<A, B, C>(a: A, b: B, c: C): [A, B, C]
  • thruple :: a -> b -> c -> (a, b, c)

    Create a thruple given three values.

    Type parameters

    • A

    • B

    • C

    Parameters

    • a: A
    • b: B
    • c: C

    Returns [A, B, C]

Const tuple

  • tuple<A, B>(a: A, b: B): Tuple<A, B>

Generated using TypeDoc