January 2019
Intermediate to advanced
246 pages
5h 23m
English
| | 12 + 12 # => 24 |
| | |
| | "12 + 12" # => 12 + 12 |
| | |
| | "12" + "12" # => 1212 |
| | |
| | "I" * 5 # => "IIIII" |
The following statements give compilation errors:
| | '12' + '12' # => unterminated char literal, use double quotes for strings |
| | |
| | 5 * "I" # => no overload matches 'Int32#*' with type String |
| | |
| | "12" + 12 # => no overload matches 'String#+' with type Int32 |
| | |
| | "2" * "5" # => no overload matches 'String#*' with type String |
delete.cr
empty.cr
99_bottles_of_beer.cr
method.cr
a. union.cr
b. class.cr
For 500,000 fibers, I got:
$ crystal build fibers.cr --release
$ time ./fibers # => real 0m5.242s
Read now
Unlock full access