0.1.0 • Published 2 years ago

fuzion v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Fuzion

Runtime implementation of shortcut fusion for JavaScript and TypeScript.

Definition (haskell docs)

Shortcut fusion is an optimizer method that merges some function calls into one. E.g., map f * map g can be substituted by map (f * g), and filter p * filter q can be substituted by filter (\x -> q x && p x). It can also help to remove intermediate data structures. E.g., computing sum [1..n] does not require an explicit list structure, and the expression is actually translated into a simple loop.

API

So far, it supports the following operators:

  • fuzion - performs left-to-right function composition. In some libraries this function is named pipe, sequence.
  • map - applies another function to a list of elements and returns a new result on every element in the calling array.
  • filter - invokes a provided predicate function for each array element and includes it into the result.
  • forEach - executes a provided function once for each array element.
  • take - cuts the length of the produced result. It helps to save operators calls to other operators on array elements that will not be included in the final result.
0.1.0

2 years ago

1.0.0-alpha.0

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago