challenges

my solutions to various "programming challenge" problems
git clone https://wehaveforgeathome.hates.computer/challenges.git
Log | Files | Refs | LICENSE

028.io (268B)


      1 #!/usr/local/bin/io
      2 
      3 nextFour := method(current, step,
      4   list(1, 2, 3, 4) map(v, current + (step * v))
      5 )
      6 
      7 current := 1
      8 sum := current
      9 
     10 for(step, 2, 1000, 2,
     11   theseFour := nextFour(current, step)
     12   current = theseFour last
     13   sum = sum + (theseFour sum)
     14 )
     15 
     16 sum println