Skip to content

Commit

Permalink
fun example program
Browse files Browse the repository at this point in the history
  • Loading branch information
vmchale committed Jan 4, 2023
1 parent c91c901 commit a5b5040
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions examples/fdupes.jac
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{. invoke like so:
{. fd . -t f -x md5sum | sort | ja run fdupes.jac
{. inspired by Yann Le Du: https://twitter.com/Yann_Le_Du/status/1610299070819729410

fn step(acc, this) :=
if (substr this 0 32) = (substr (acc->1) 0 32)
then (this . Some (this + '\n' + acc->1))
else (this . None);

(->2):?step^(''.None) $0

0 comments on commit a5b5040

Please sign in to comment.