• Stars
    star
    2,049
  • Rank 22,561 (Top 0.5 %)
  • Language
    JavaScript
  • Created about 11 years ago
  • Updated about 4 years ago

Reviews

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

Repository Details

A functional javascript workshop. No libraries required (i.e. no underscore), just ES5.

Functional Javascript Workshop

Gitter NodeSchool Discussions

Teaching fundamental functional programming features of Javascript.

No libraries required (i.e. no underscore), just ES5.


Gittip

Mission

Many functional programming learning resources will teach you to write functional code, but it's often highly indirect, deeply abstracted, requires understanding complex relationships between custom library calls, and doesn't represent the reality of how people actually write JavaScript.

The goal of this workshop is to create realistic problems that can be solved using terse, vanilla, idiomatic JavaScript.

Please read the exercises thoroughly and obey all conditions, they are there to help you learn!

Installation & Update

$ npm install -g functional-javascript-workshop@latest

Some npm installations require use of sudo in the above command. Recommend to instead reinstall node/npm so you don't need sudo.

Usage Instructions

1. Selecting a problem to work on

Once the workshop is installed, run functional-javascript-workshop to print a menu where you can select a problem to work on.

$ functional-javascript-workshop

Problems are listed in rough order of difficulty. You are advised to complete them in order, as later problems will build on skills developed by solving previous problems.

2. Writing your solution

Once you have selected a problem, the workshop will remember which problem you are working on. Using your preferred editor, simply create a file to write your solution in. Most problems will supply some boilerplate with which to get started. Copy this from the problem description to your solution file.

3. Testing your solution

Use the workshop's run command to point the workshop at your solution file. Your solution will be loaded and passed the problem input. This usually won't perform any validation, it will only show the program output.

$ functional-javascript-workshop run mysolution.js

4. Verifying your solution

Your solution will be verified against the output of the 'official' solution. If all of the output matches, then you have successfully solved the problem!

$ functional-javascript-workshop verify mysolution.js

Stuck?

Feedback and criticism is welcome, please log your troubles in issues.

Full curriculum reviews like this one are incredibly helpful. More feedback like this please!

We're looking for more practical problems, so if you come across a problem in your day-to-day work which was solved simply and elegantly with some functional JavaScript techniques, please help us create an exercise out of it.

Screenshots

screen shot 2013-09-27 at 5 18 45 pm screen shot 2013-09-23 at 9 13 02 pm

Resources

A growing collection of quality functional javascript resources can be found in the wiki.

Thanks rvagg

This tutorial was built using rvagg's workshopper framework.

Summary

 project  : functional-javascript
 repo age : 7 months
 active   : 50 days
 commits  : 152
 files    : 70
 authors  :
    69	Tim                     45.4%
    67	Tim Oxley               44.1%
     3	Sequoia McDowell        2.0%
     2	ZJ                      1.3%
     1	Naor Biton              0.7%
     1	Pavel Kornilov          0.7%
     1	Steve Teo               0.7%
     1	Wei Lu                  0.7%
     1	Yoshua Wuyts            0.7%
     1	flakyfilibuster         0.7%
     1	Arvid Andersson         0.7%
     1	tim walker              0.7%
     1	Brendon Murphy          0.7%
     1	Lorcan Coyle            0.7%
     1	Matthew Hokanson        0.7%

License

MIT

More Repositories

1

best-practices

Tidbits of developer best practices from around the web
1,275
star
2

keycode

Convert between keyboard keycodes and keynames and vice versa.
JavaScript
452
star
3

columnify

Create text-based columns suitable for console output. Supports cell wrapping.
JavaScript
428
star
4

linklocal

Install local dependencies as symlinks.
JavaScript
349
star
5

npm-run

Run locally-installed node module executables.
JavaScript
183
star
6

polyfill-webcomponents

(deprecated) Browserify-compatible web-component polyfills, courtesy of Polymer
JavaScript
119
star
7

pkgfiles

Sanity check which files you are and aren't about to publish to npm
JavaScript
82
star
8

npm-which

Locate a program or locally installed node module's executable
JavaScript
78
star
9

offset

Get offset of an element within the document
JavaScript
59
star
10

wcwidth

Port of C's wcwidth() and wcswidth()
JavaScript
52
star
11

npm-path

Get a PATH containing locally installed module executables.
JavaScript
49
star
12

colornames

Map color names to HEX color values
JavaScript
45
star
13

react

Emit change events whenever object changes. Compatible with component/reactive.
JavaScript
41
star
14

sift

Fast String Distance (SIFT) Algorithm
JavaScript
40
star
15

npm3

Use npm v3 alongside your currently installed npm.
JavaScript
34
star
16

pkgcount

Produce a report on number of duplicate packages in node_modules.
JavaScript
29
star
17

scroll-position

Fire events when scrolling over dom elements
JavaScript
28
star
18

next-tick

process.nextTick for browser
JavaScript
25
star
19

robotlegs-utilities-UndoableCommand

Undoable Command Classes for Robotlegs Framework
JavaScript
24
star
20

npm-tutor

npm tutor for nodeconf 2014
JavaScript
23
star
21

saltmine

Arbitrary computation on the GPU using WebGL.
JavaScript
22
star
22

mdm-tunnel

A tunnel for getting behind NATs
JavaScript
20
star
23

cruft

Delete cruft from npm packages
JavaScript
19
star
24

nim

Command-line tool for inspecting node library objects, function implementations and listing properties – with syntax highlighting.
JavaScript
19
star
25

adventure-map

Simple exercise loader & generators for substack/adventure.
JavaScript
19
star
26

tojson-loader

WebPack Loader. Generate JSON assets at build-time.
JavaScript
18
star
27

css-path

Get CSS path to an element.
JavaScript
18
star
28

chimes

`Array.prototype` iteration methods for any iterator.
JavaScript
18
star
29

to-factory

Convert ES6 classes into factory functions so they can be called with or without new.
JavaScript
18
star
30

graphs

An intuitive data structure for graphs, implemented using ES6 data structures.
JavaScript
17
star
31

canvas-noise

Generate noise on a canvas.
JavaScript
16
star
32

serializerr

Convert Errors & Objects into an easily-serialized vanilla Object.
JavaScript
15
star
33

osi-licenses-full

All OSI-approved licenses as markdown
JavaScript
15
star
34

split-object

Work with Objects using built-in functional Array methods.
JavaScript
14
star
35

assertf

assert with printf message formatting
JavaScript
14
star
36

pkgrep

Powerful CLI tool to find, filter & format package data in node_modules.
JavaScript
13
star
37

npm-next

Wraps the latest unstable version of npm with different name so you can test alongside stable npm.
JavaScript
12
star
38

pkill

Convenience wrapper around `pkill(1)`
JavaScript
12
star
39

async-compose

Compose multiple async functions together to operate on a result.
JavaScript
11
star
40

voxel-real-physics

"Real" physics for VoxelJS with CANNON.JS
JavaScript
11
star
41

scriptloader

Absurdly simple on-demand script loader.
JavaScript
10
star
42

node-webhooks

easily create webhooks
JavaScript
10
star
43

protochain

Get the prototype chain of an object or primitive as an Array.
JavaScript
9
star
44

get

Create functions for use with map, reduce, filter, etc. that get object properties without need for anonymous wrappers.
JavaScript
9
star
45

express-koans

WIP Express 3 Koans
JavaScript
9
star
46

color-convert

Convert colors between RGB, HSL & HSV.
JavaScript
9
star
47

til

Today I learned
8
star
48

file-uploader

Programmatic multipart file uploads
JavaScript
8
star
49

enode

Easily harness the power of DNode/Upnode
JavaScript
8
star
50

beforefn

Execute a function before a function.
JavaScript
8
star
51

afterfn

Invoke a function after a function.
JavaScript
7
star
52

neuquant

NeuQuant Neural-Net Quantization Algorithm
JavaScript
7
star
53

guardfn

Conditionally execute a function
JavaScript
7
star
54

voxel-merge

Merge voxel chunks into convex volumes.
JavaScript
7
star
55

to-array

Convert an array-like object into an Array.
JavaScript
7
star
56

installed

Read all the installed packages in a folder, and produce an Array of all the data.
JavaScript
7
star
57

pkgresolve

Resolve a dependency from within the context of another package.
JavaScript
6
star
58

stitchup

Command-line stitchjs. Easily package and minify Javascript & Coffeescript CommonJS modules. Individual modules can be imported in the browser via require()
CoffeeScript
6
star
59

midi-experiment

JavaScript
6
star
60

assert

assert module ported from Node.JS for use as a component in the browser.
JavaScript
6
star
61

xpath

XPath utilities extracted from Firebug.
JavaScript
6
star
62

grunt-ember

Collate Ember templates into a single file
JavaScript
6
star
63

candlelightproject

Android IPv6 Geo-Location Based Wireless Mesh Network
Java
6
star
64

opengl-es2-docset

Dash docset for OpenGL ES 2.0 (i.e. webgl)
HTML
5
star
65

element-collection

Provide enumerable methods (find/select/filter) to collections of DOM Elements
JavaScript
5
star
66

ordered-set

A performant ES6 Set subclass that defines custom iteration order.
JavaScript
5
star
67

fnfn

Add before/after/around/guard functions to an API.
JavaScript
5
star
68

statement

A State Machine. Under Construction.
JavaScript
5
star
69

cellutron

My first attempt at a game. Top down 'shooter' style. Pure AS3. Uses box2d physics, TweenMax for tweening & Flint for some particles.
ActionScript
4
star
70

npm-prev

Wraps previous stable version of npm so you can run it alongside other npm versions
JavaScript
4
star
71

element-selector

Use mouse to select elements on the screen
JavaScript
4
star
72

npm-fresh

Keep your npm cache fresh.
JavaScript
4
star
73

candlelight

Android Mesh Network
3
star
74

silk-app-examples

Gregfroese's Silk Example Components
PHP
3
star
75

pipe-graph

Generate graphs of your streams.
JavaScript
3
star
76

overshadow-listeners

Add an event listener before existing listeners.
JavaScript
3
star
77

signalfn

Simple signalling
JavaScript
3
star
78

es5-workshop

Introduction to ES5 methods.
JavaScript
3
star
79

slow-install

An npm package that's slow to install. Slowness is configurable.
JavaScript
2
star
80

get-descriptor

Prototype-aware Object.getOwnPropertyDescriptor
JavaScript
2
star
81

eventsource-stream

Stream events to the browser as server-sent events.
JavaScript
2
star
82

node-xmlrpc-multicall

system.multicall for node-xmlrpc
JavaScript
2
star
83

bin-path

Get paths to module executables
JavaScript
2
star
84

attribute-binding

Bind to incoming data via attributes on your custom elements.
JavaScript
2
star
85

component-server

Easily serve local components as dependencies.
JavaScript
2
star
86

statemachine

A State Machine. Under Construction.
JavaScript
2
star
87

xpath2css

Convert simple xpaths to CSS selectors.
JavaScript
2
star
88

namefn

Rename a function.
JavaScript
2
star
89

lzw

LZW Encoder
JavaScript
2
star
90

component-badge

Generate component badges. WIP
JavaScript
2
star
91

backbone-events

Backbone.Events API as a component
JavaScript
2
star
92

browserify-slides

SingaporeJS 17 Feb 2014
JavaScript
2
star
93

component-dashdoc

Generate a Dash docset for published components.
JavaScript
2
star
94

tapef

Tape API with Mocha's error output. A hack.
JavaScript
2
star
95

switchstream

switch between output streams. e.g. a filter that pipes valid & invalid data to different streams
JavaScript
2
star
96

dom-support

Component to test browser feature support.
JavaScript
2
star
97

pincushion

JavaScript
2
star
98

expressions

Grab bag of template binding expressions.
JavaScript
2
star
99

overlay

Generate overlays over DOM elements.
JavaScript
2
star
100

npm-home

Chrome Extension. Redirects to a package's github page from npm.org. Simulates original behaviour of `npm home`.
JavaScript
2
star