Commit graph

4 commits

Author SHA1 Message Date
Vincent Ambo
10e2e56b67 refactor(fun/wcl): Use portable unix-opts library
unix-opts, imported into buildLisp.nix in the previous commit,
provides an implementation independent way of parsing command line
arguments.
2020-01-29 10:12:07 +00:00
Vincent Ambo
b0b52255bd fix(fun/wcl): Use 'eql' for byte comparisons
The fact that this works is just an implementation-specific detail. In
theory, 'eq' will only compare object instance equality and not value.

Thanks to /u/patrec from HN for pointing this out.
2020-01-29 00:03:50 +00:00
Vincent Ambo
39b0176026 fix(fun/wcl): Count words correctly if file starts with whitespace 2020-01-28 21:24:51 +00:00
Vincent Ambo
1ba3d1cf97 feat(fun/wcl): Add a simple 'wc' clone in Lisp
Prompted by this thread:
https://lobste.rs/s/zntyeq/wc_d_712_characters_without_single_branch
2020-01-28 21:07:13 +00:00