Types
Permanent link to this comic:
https://xkcd.com/1537/
Image URL (for hotlinking/embedding):
https://imgs.xkcd.com/comics/types.png
My new language is great, but it has a few quirks regarding type:
[[Gray and white type on a black background.]]
[1]> 2 + "2"
=> "4"
[2]> "2" + [ ]
=> "[2]}
[3] (2
0)
=> NaN
[4]> (2
0)+2
=> NaP
[5]> ""+""
=> '"+"'
[6]> [1,2,3] + 2
=> FALSE
[7]> [1,2,3] +4
=> TRUE
[8] 2
(2-(3
2 + 1
2))
=> NaN.00000000000000013
[9]> RANGE(" ")
=> (' " ', "!", " ", '"')
[10]> +2
=> 12
[11]> 2+2
=> DONE
[14]> RANGE (1,5)
=> (1,4,3,4,5)
[13]> FLOOR(10.5)
=> |
=> |
=> |
=> |___10.5___
{{Title text: colors.rgb("blue") yields "#0000FF". colors.rgb("yellowish blue") yields NaN. colors.sort() yields "rainbow"}}