essentialscr v0.1.0

Crystal Lang Essential Macros

Installation

dependencies:
  essentials:
    github: iainmon/essentialscr
    branch: master

for loops

require "essentials"
array = [1, 2, 3, 4, 5]

for a in array do
  puts a
end
for i = 0, i < array.size, i += 1 do
    puts array[i]
end

method_alias

method_alias domain = Num.arange
method_alias sin = Math.sin
method_alias read_file = File.read

func

func f of x, y do
  Math.sqrt x**2 + y**2
end

z = f 1, 1

# z = sqrt 2
Owner
github statistic
  • 0
  • 0
  • 0
  • 0
  • about 1 month ago
  • May 25, 2020
License

Links
Synced at

Tue, 07 Jul 2020 19:33:52 GMT