chaining ...It macros doesn't work 
[https://github.com/nim-lang/Nim/issues/12928](https://github.com/nim-lang/Nim/issues/12928)/

do have a look at 
[zero_functional](https://nimble.directory/pkg/zerofunctional) it does chaining 
well, and inlines each link into the same loop

like this: 
    
    
    import zero_functional,sugar
    proc disorganize1(books: seq[string]):seq[string] =
      result = (books --> map((b: it, t: it.toCountTable)) --> map((b:it.b,t:(
         it.t['A'] + it.t['a'],
        it.t['E'] + it.t['e'],
        it.t['I'] + it.t['i'],
        it.t['O'] + it.t['o'],
        it.t['U'] + it.t['u'],
        it.b.reversed.join
      )))).sorted((x,y)=>cmp(x.t,y.t)) --> map(it.b)
    
    
    Run

tried it on a large chunk of text, was about 10x faster than the sequtils 
version

Reply via email to