Introduction

About #

RocketLang as of version 0.9.5 is the full (as in the book was worked through) version of MonkeyLang and is then being extended with various useful and not so useful features.

Latest Version #

GitHub release Average time to resolve an issue Percentage of issues still open

Quick Start #

input = open("examples/aoc/2021/day-1/input").lines()


a = []
foreach i, number in input {
  a.yoink(number.strip().plz_i())
}
input = a

increase = 0
foreach i, number in input {
  if (number > input[i-1])
    increase = increase + 1
  end
}
puts(increase + 1)

increase = 0
foreach i, number in input {
  sum = number + input[i+1] + input[i+2]
  sum_two = input[i+1] + input[i+2] + input[i+3]
  
  if (sum_two > sum)
    increase = increase + 1
  end
}
puts(increase + 1)