Different programming styles for implementing the same word count program.
JavaScript
Latest commit b153bbd Nov 11, 2015 @airportyh Merge pull request #3 from guido4000/patch-1
Fix comments referencing proper function names

README.md

Word Count (Top 10)

This repo contains implementations of the same program but in different programming styles, including imperative, object-oriented programming, and functional programming. It is intended to be a teaching tool for people starting to learn about functional programming - to get concrete examples of how fp compares to other existing styles.

The way to read this repo is to read each .js in order - the files are numbered. The code itself has ample comments.

To Run

If you want to run these examples, you need Node.js version 5.0+.

git clone https://github.com/airportyh/word-count.git
cd word-count
npm install

To run one of the files, simply type node <name of the file>, for example:

node 1.imperative.js