• Stars
    star
    125
  • Rank 276,984 (Top 6 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 5 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Lightweight curried functional programming library

Arare

Lightweight auto-curried functional programming library

Header

Build Status

Description

Lightweight and without any external dependencies arare enables you to write tacit, point-free, declarative & clean code while avoiding side-effects and mutations. Internally the library itself, comprised of over 200 functions, follows the functional programming paradigm and is materialized using fundamental functional qualities such as currying, recursion, tail calls, high-order functions, referential transparency, side-effects elimination and function composition. Additionally, arare utilizes automatic variadic currying for its functions, thus allowing the user to write more flexible, practical & minimal code, compared to regular strict currying. Finally, the library comes with a build-in interactive REPL environment, useful for directly inspecting and experimenting with all available modules without leaving the console.

Please note that project is in its early days and that it is currently under active development.

Come over to Gitter or Twitter to share your thoughts on the project.

Highlights

  • Over 200 available functions
  • Build-in interactive REPL
  • Point-free & tacit
  • High-order & pure functions
  • Automatic variadic currying
  • Declarative & minimal syntax
  • Side-effects & mutations free
  • Lightweight with zero dependencies
  • Build with functional code
  • Actively developed

Contents

Install

npm install arare

Usage

Import arare and start using directly any of the available modules.

const A = require('arare')

A.map(A.add(10), A.range(1, 4, 1))
//=> [11, 12, 13]

Alternatively, select and import only the modules that you need.

const {add, map, range} = require('arare')

map(add(10), range(1, 4, 1))
//=> [11, 12, 13]

REPL

Initially, install arare globally in order to be able to access the REPL environment.

npm install -g arare

To launch the REPL simply type arare from anywhere in your console.

arare # launch REPL
REPL

API

The following lists contain all available functions grouped into categories according to the type of their respective returning value.

An alphabetically ordered list of all available functions can be found here.

Any

Functions whose return value varies according to their input.

Array

Functions whose return value is an array.

Boolean

Functions whose return value is a boolean.

Function

Functions whose return value is a function.

Number

Functions whose return value is a number.

String

Functions whose return value is a string.

Object

Functions whose return value is a plain object.

Undefined

Functions whose return value is undefined.

Development

  • Fork the repository and clone it to your machine
  • Navigate to your local fork: cd arare
  • Install the project dependencies: npm install or yarn install
  • Lint the code and run the tests: npm test or yarn test

Team

License

MIT

More Repositories

1

taskbook

Tasks, boards & notes for the command-line habitat
JavaScript
8,866
star
2

signale

Highly configurable logging utility
JavaScript
8,864
star
3

tusk

Refined Evernote desktop app
JavaScript
3,147
star
4

ao

Elegant Microsoft To-Do desktop app
JavaScript
2,078
star
5

qoa

Minimal interactive command-line prompts
JavaScript
2,044
star
6

hyper-pokemon

Tailor-made PokΓ©mon themes for your Hyper terminal
JavaScript
1,033
star
7

moviebox

Machine learning movie recommending system
Python
521
star
8

awesome-prolog

Curated list of Prolog packages and resources
476
star
9

hyper-star-wars

Super awesome your Hyper terminal shall look
JavaScript
247
star
10

hyperocean

Deep oceanic blue Hyper theme
JavaScript
227
star
11

singlie

Singly circular & linear linked lists for ES6
JavaScript
187
star
12

rels

Github release analytics for the console
JavaScript
88
star
13

binstree

Binary search trees for ES6
JavaScript
34
star
14

oceandock

Deep oceanic blue Plank dock theme
JavaScript
31
star
15

prioqueue

Priority queues for ES6
JavaScript
24
star
16

doublie

Doubly circular & linear linked lists for ES6
JavaScript
22
star
17

dsforest

Disjoint-set forests for ES6
JavaScript
16
star
18

mheap

Binary min & max heaps for ES6
JavaScript
12
star
19

kiu

FIFO Queues for ES6
JavaScript
12
star
20

itermocean

Deep oceanic blue iTerm theme
12
star
21

avlbinstree

AVL self-balancing binary search trees for ES6
JavaScript
12
star
22

operating-systems

Inter-process communication, synchronization & scheduling algorithms
C
12
star
23

binoheap

Binomial heaps for ES6
JavaScript
9
star
24

shtack

LIFO Stacks for ES6
JavaScript
9
star
25

microcomputer-assembly

Microcomputer programs in 8085, 8086 & AVR assembly
Assembly
9
star