I hereby claim:
- I am elsatko on github.
- I am elsamo (https://keybase.io/elsamo) on keybase.
- I have a public key ASBUjY-B8bKJ4C2ENsv3eYxRGbjJjQJV4gczgPX9KzVlLwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# load into irb with `irb -r ` and then the path to the file | |
# in irb run with `words_with("a")` | |
def words_with(letter) | |
dictionary = File.readlines("/usr/share/dict/words").map(&:chomp).map(&:downcase) | |
words_with_letter = [] | |
dictionary.each do |word| | |
if word.length <= 7 && word.include?(letter) | |
words_with_letter << word |
# ex 1 | |
who_you_gonna = Proc.new do | |
puts "Ghostbusters!" | |
end | |
who_you_gonna.call | |
# ex 2 | |
def count(things, number, &block) |
alpha_array = [] | |
input = gets.chomp | |
until input == "" | |
alpha_array.push(input) | |
input = gets.chomp | |
end | |
puts alpha_array.sort |