3 ms·
Shoot, I totally overlooked that part. Here's the proper version: :load wordlist wordlist.txt =hasABC { all (count _ x == 1) "abc" } words wordlist | fil
by nemo1618 3y ago
Shoot, I totally overlooked that part. Here's the proper version:
:load wordlist wordlist.txt
=hasABC { all (count _ x == 1) "abc" }
words wordlist | filter -:(len == 10 and hasABC and .8 == "k")
Notes:
{ } defines a lambda with parameters named x,y,z,a,b,c...
_ is the same as in noulith -- it turns any expression into a lambda. Values can also be omitted from most expressions (e.g. len == 10) for the same effect.
-: takes a lambda with n parameters and turns it into a lambda that takes 1 parameter and replicates it n times.
- jodrellblank 3y agoThat is neat!