Coder Social home page Coder Social logo

iterrr's Issues

nested problems

let's say we have an string i, and we wanna iterator over it line by line

import std/strutils
let i = "..."

but this style of writing uses the funcion of splitLines

i.splitLines.iterrr:
    map it.strip()
    toseq()

but this style of writing uses the iterator of splitLines

iterrr i.splitLines:
    map it.strip()
    toseq()

add `define`

  (1 .. 10) |> define( 
    a = it + 1
    b = a +2
  )
  .map(b)
  .toseq()

`iterrr` macro removed.

iterrr was removed by 1ceb979. Is it possible to have it back or implement it in my own code using symbols exported from the iterrr module? I used to be able to write stuff like this:

      dest = something.iterator.iterrr:
        map: do_something(it) # do_something
        map: do_something_else(it) # do_something_else
        toSeq()

and loved it ๐Ÿ˜„ . Thank you!

make it simple, make it usable

  • remove "Non Operator Version"
  • remove bracket style variable naming
  • add toCountTable reducer
  • migrate completely to templates
  • new custom reducer style
  • remove debug infix !> - ( use -d:iterrrDebug instead)
  • new documentation

problem with nested calls

I have the following code:

echo:
  @[@[1,2],@[3,4]].pairs |>
    map[ia,a](
      a.pairs |>
        map[ib,_]($(ia==ib)).
        strJoin()).
    strJoin()

result: truetruetruetrue
and the indicies schoudnt be all the same

Add `ifor`

Some thing like for* in Racket-lang.

Use filter instead of #:when

add custom reducer

My view is that a lot of the time in Nim when you're doing filter or map you're just going to operate it on afterwards

for data in lines("file").map(parseInt):
  echo data

-beef-

my solution

lines("file") >< imap(parseInt).do(data):
  echo data

Finalizer

The default finalizer is i_toSeq if it's not set explicitly.

Other finalizers can be:

  1. iall
  2. Iany
  3. ItoSet
  4. ItoHashset
  5. ICount
  6. IMax
  7. IMin
  8. IMaxMin
  9. ...

nested call variable shadowing

shadowing variable names doenst seem to work correctly.

neither with custom name:

echo:
  @[@[1,2],@[3,4]].items |>
    map[a](
      a.items |> map[a](a+1).toSeq()).
    toSeq()

nor with it:

echo:
  @[@[1,2],@[3,4]].items |>
    map(
      it.items |> map(it+1).toSeq()).
    toSeq()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.