Skip to content

Instantly share code, notes, and snippets.

@ianloic
Created September 24, 2018 17:21
Show Gist options
  • Save ianloic/37e0202d342e71d5252c76898d395aa2 to your computer and use it in GitHub Desktop.
Save ianloic/37e0202d342e71d5252c76898d395aa2 to your computer and use it in GitHub Desktop.
Various hellos world.
require 'rdl'
require 'types/core'
extend RDL::Annotate
type '(String) -> nil', typecheck: :now
def greet(name)
puts "hello, #{name}."
end
greet 'world'
function greet(name) {
console.log(`hello, ${name}.`);
}
greet('world');
def greet(name)
puts "hello, #{name}."
end
greet 'world'
function greet(name: string): void {
console.log(`hello, ${name}.`);
}
greet('world');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment