forloop.cr

For-loops for crystal lang

forloop

Two very simple for-loop macros for crystal.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      forloop:
        github: iainmon/forloop.cr
    
  2. Run shards install

Usage

require "forloop"

# Regular for loop
for x = 0, x < 5, x += 1 do
  puts x
end

# For-in loop
for x in 1..5 do
  puts x
end

Contributing

  1. Fork it (https://github.com/iainmon/forloop.cr/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Repository

forloop.cr

Owner
Statistic
  • 1
  • 0
  • 0
  • 1
  • 0
  • over 4 years ago
  • October 18, 2019
License

MIT License

Links
Synced at

Thu, 02 May 2024 14:45:39 GMT

Languages