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
Repository

essentialscr

Owner
Statistic
  • 0
  • 0
  • 0
  • 1
  • 3
  • over 4 years ago
  • May 25, 2020
License

Links
Synced at

Thu, 21 Nov 2024 22:17:49 GMT

Languages