• This repository has been archived on 24/Jun/2018
  • Stars
    star
    381
  • Rank 108,832 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 16 years ago
  • Updated over 7 years ago

Reviews

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

Repository Details

Functional is a library for functional programming in JavaScript. It defines the standard higher-order functions such as map, reduce (aka foldl), and select (aka filter). It also defines functions such as curry, rcurry, and partial for partial function application; and compose, guard, and until for function-level programming.

Functional JavaScript (deprecated)

This code, from 2007, is deprecated. I'm keeping it available for historical interest.

Some of the ideas in this code and in its companion collections.js were used in Jeremy Ashkenas's Underscore.js, which in turn inspired Lodash. Use those instead.

CoffeeScript (aso by Jeremy Ashkenas) and ECMAScript 6 also include arrow functions and functional programming functions such as map. If you use these languages, or many other modern languages that compile into ECMAScript, you can do functional prorammming entirely within the language.

Thanks to everyone who has contributed, and to everyone who has thanked me over the years, thank you in turn.

Links

Original README

Functional defines higher-order methods and functions for functional and function-level programming. It also defines "string lambdas", that allow strings such as x+1 and x -> x+1 to be used in some contexts as functions.

It is licensed under the MIT License.

For more details, see http://osteele.com/sources/javascript/functional/.

Credits

  • Oliver Steele โ€“ original author
  • Dean Edwards โ€“ Array.slice suggestion
  • henrah โ€“ Function.lambda memoization
  • Raganwald โ€“ Rhino compatibility
  • Jesse Hallett โ€“ Spidermonkey shell compatibiilty
  • Florian Schรคfer โ€“ allow leading and trailing spaces in expressions
  • Angus Croll โ€“ bug fix

More Repositories

1

gojekyll

A fast Go implementation of the Jekyll blogging engine
Go
317
star
2

liquid

A Liquid template engine in Go
Go
243
star
3

callgraph

Magic to display dynamic call graphs of Python function calls
Python
64
star
4

dart-tonic

Music theory Dart package
Dart
50
star
5

jquery-profile

jQuery plugin to profile calls to jQuery selectors.
JavaScript
39
star
6

p5-server

Command-line tool to create and run p5.js sketches. It runs a server with live reload, sketch-aware directory listings, automatic libraries for JavaScript-only sketches.
TypeScript
38
star
7

collections-js

Framework-independent JavaScript collection methods.
JavaScript
32
star
8

ipython-secrets

A Python package that simplifies the use of secrets in a Jupyter notebook
Python
21
star
9

matrix-archive

Export a Matrix room message archive
Python
20
star
10

cl-spec

BDD for Common Lisp
Common Lisp
18
star
11

jsspec

A clone of Alan Kang's JSSpec
JavaScript
17
star
12

tonic.ts

TypeScript music theory, pitch constellation diagram, and guitar chord calculator
TypeScript
15
star
13

sequentially

Sequentially is a library of temporal and frequency adverbs for JavaScript. It provides methods to queue a function for deferred or periodic execution, and to throttle the rate or number of times that a function can be called. You could think of it as a kind of memoization, where instead of caching the result it modifies when and whether a function is called.
JavaScript
14
star
14

imu-tools

Send sensor data from an ESP + BNO055 โ†’ MQTT and/or serial port
Python
12
star
15

tuesday

Ruby-compatible strftime for golang
Go
12
star
16

mop-js

JavaScript utilities for Metaobject Programming
JavaScript
12
star
17

fluently

Fluent programming (chained method calls) for JavaScript.
JavaScript
12
star
18

Arduino-BLE-IMU

Publish IMU data over BLE
C++
10
star
19

javascript_fu

A Rails plugin to add more support for javascript files.
Ruby
9
star
20

pyfsa

Python FSA constructor, determinizer, and minimizer.
Python
9
star
21

vscode-p5server

VSCode extension to launch a live server that is aware of p5.js
CSS
8
star
22

banyan

Visualize Dropbox file and folder sizes
Elm
8
star
23

fingerboard

Display the violin, viola, and cello fingerings for each scale
CoffeeScript
8
star
24

gsheet-keyring

Python Keyring backend backed by a Google Sheet
Python
7
star
25

db_content

Rails plugin to add sql dump and restore tasks
Ruby
7
star
26

bootle

โ€œShould array indices start at 0 or 1? My compromise of 0.5 was rejected without, I thought, proper consideration.โ€ โ€” Stan Kelly-Bootle
Python
7
star
27

cfdg-js

A JavaScript implementation of Chris Coyne's Context Free Design Grammar.
JavaScript
7
star
28

p5.libs

JavaScript
6
star
29

flinx

Configuration-free Sphinx documentation
Python
5
star
30

p5-react

A component that embeds a p5.js canvas in a React application
JavaScript
5
star
31

classroom-tools

Tools for collecting and analyzing assignments โ€“ mostly related to GitHub and Jupyter notebooks โ€“ plus a few other tasks.
Python
5
star
32

openlaszlo-json

JSON library for OpenLaszlo
JavaScript
5
star
33

sneetches

A Chrome extension that adds star counts next to GitHub repo links
TypeScript
5
star
34

multiclone

Clone forks of a GitHub repo, or copies of a GitHub Classroom assignment
Go
4
star
35

lzosutils

OpenLaszlo utilities: flash bridge, ajax, etc.
JavaScript
4
star
36

openlaszlo_plugin

The OpenLaszlo Rails plugin makes it easy to use OpenLaszlo client-side applications with Rails.
JavaScript
4
star
37

jcon

Conformance checking of JSON values against ECMAScript 4.0 types
Ruby
4
star
38

fretboard

Tools for rendering guitar fretboard and chord diagrams.
JavaScript
4
star
39

git-timelapse

Create time-lapse movies of git repo files, metrics, or other artifacts
Python
4
star
40

wideurl.com

The PHP behind 2006's wideurl.com.
PHP
3
star
41

html2dbk

HTML to Docbook converter
HTML
3
star
42

QtTileDual

Draw a graph and its duals. I wrote this to learn Qt.
C++
3
star
43

python-utils

Oliver's Python utilities
Python
3
star
44

p5pose

Starter kit for exploring WebCam-based pose recognition with PoseNet and p5.js
JavaScript
3
star
45

p5-template

https://www.notion.so/P5-js-Particle-Workshop-aba7992a689c457a8cca10e2f49e6a04
HTML
3
star
46

gem_recent-updates

A gem command plugin that displays the tops of the history files of recently updated gems.
Ruby
2
star
47

storyboard

An ruby-processing extension for scripting storyboarded explanatory visualizations. In progress.
Ruby
2
star
48

minimal-keys

Compute the unique minimal keys from a collection of strings or sequences.
Python
2
star
49

code.osteele.com

Elm
2
star
50

notebooks

Miscellaneous Jupyter notebooks.
Jupyter Notebook
2
star
51

inventiveminds.xyz

Source to Inventive Minds web site
Ruby
2
star
52

p5pose-optitrack

Use p5.js to render data from an OptiTrack CSV -> WebSocket server.
JavaScript
2
star
53

osteele.com

Source to personal web site
PHP
2
star
54

gh-forkstats

Displays GitHub forks and their stats, to identify successors to abandoned repos.
JavaScript
2
star
55

ffmachine

DEC Digital Logic Module editor and simulator
CoffeeScript
2
star
56

ropenlaszlo

ROpenLaszo is a Ruby interface to the OpenLaszlo compiler. It allows you to compile OpenLaszlo programs from within Ruby, in order to integrate OpenLaszlo development into Rake or Rails applications.
Ruby
2
star
57

lztestkit

BDD for OpenLaszlo.
JavaScript
2
star
58

hackingthelibrary.org

Hacking the Library 2017 and 2018 @ Olin College
HTML
2
star
59

imu-client-examples

Example web programs that use the imu-tools npm package to connect via BTLE or MQTT to an ESP32 + BNO055
JavaScript
2
star
60

git-keychain-secrets

Store some parts of a repo file in the macOS Keychain; keep the rest un-encrypted
Ruby
2
star
61

old-blog

Ruby
1
star
62

tidal-memories

On-the-ground piece for Dinacon
JavaScript
1
star
63

matrix-photo-gallery

A photo gallery for photos from a Matrix room.
JavaScript
1
star
64

liquid-tabulator

Olin Election Techology Co-Curricular Vote Tabulator
Python
1
star
65

html2cheatsheet

Create a Dash Cheatsheet from HTML on apple.com
Python
1
star
66

changelog-parser

An npm package that parses CHANGELOG files from markdown to JSON.
CSS
1
star
67

terminal-codes-to-html

Convert strings that include terminal color codes to HTML or plain text.
TypeScript
1
star
68

nbcollate

Collate Jupyter assignment notebooks
Jupyter Notebook
1
star
69

p5-orientation-and-motion-example

JavaScript
1
star
70

protodoc

JavaScript documentation generator and pydoc equivalent
JavaScript
1
star
71

expialidocious

Timeline tag browser for delicious, in OpenLaszlo
JavaScript
1
star
72

signage

Web site playlist manager for digital signage
JavaScript
1
star
73

openlaszlo-rails-example

Ruby
1
star
74

volatility

Web page that displays the current value of Bitcoin alongside the face of a six-sided die
Elm
1
star
75

elm-extras

Personal Elm extras. Extracted from Banyan.
Elm
1
star
76

pwm-explorer

Interactive visualization of Pulse Width Modulation (PWM)
JavaScript
1
star
77

micropython-stubs

Stubs for MicroPython APIs, to assist type-checking tools
Python
1
star