This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defproject com.example/foo "0.1.0" | |
:description "Does fooness" | |
:url "http://example.com/" | |
:license {:name "Copyright ©2014 Josh Graham"} | |
:aliases {"dist" ["do" ["clean"] ["test"] ["uberjar"]] ;$ lein dist # create distribution JAR | |
"debug" ["with-profile" "dev,debug" "run"]} ;$ lein debug # run for a 'remote' debugger | |
:aot :all | |
:auto-clean false ;"dist" alias does the full cycle | |
:clean-targets ^{:protect false} [:target-path :junit-results-dir] | |
:dependencies [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%% Prime number sieve code with lazy evaluation by Joe Armstrong | |
%%% (very slightly modified for syntax check) | |
%%% http://erlang.org/pipermail/erlang-questions/1999-March/000176.html | |
-module(p3). | |
-export([from/1,filter/2,sift/2,sieve/1,primes/0, first/1]). | |
%% This generates a lazy sequence starting from K. | |
%% from(K) -> |