Skip to main content

5 docs tagged with "array"

View all tags

Concat

Implement the JavaScript Array.concat function in the type system. A type takes the two arguments. The output should be a new array that includes inputs in ltr order

First of Array

Implement a generic First that takes an Array T and returns its first element's type.

Last of Array

Implement a generic Last that takes an Array T and returns its last element.

Push

Implement the generic version of Array.push

Unshift

Implement the generic version of Array.unshift