Skip to content

Instantly share code, notes, and snippets.

@delitescere
delitescere / project.clj
Last active June 23, 2017 01:26
Mostly Java-based lein project with JUnit and Log4J2 (main.clj is still entry point)
(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 [
@jj1bdx
jj1bdx / p3.erl
Last active March 11, 2016 19:05
Prime number generator with lazy evaluation in Erlang: See http://erlang.org/pipermail/erlang-questions/1999-March/000176.html
%%% 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) ->