Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Difference Engine

Charles Babbage's Difference Engine for Clojure.

An (arguably more fun) alternative to range, infer returns a lazy sequence of zeroes of the least degree polynomial function inferred from the given pattern.

Here's a short history of its evolution.

Leiningen

[difference-engine "0.1.0-SNAPSHOT"]

Usage

(require '[difference-engine.core :refer [infer]])


(infer [1 2]) ;=> (1 2 3 4 5 ...)

(infer [100 90]) ;=> (100 90 80 70 60 ...)

(infer [1 4 9]) ;=> (1 4 9 16 25 ...)


(infer 5 [20 15]) ;=> (20 15 10 5 0)

License

Distributed under the Eclipse Public License.

About

Polynomial Sequence Generator

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages