mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 19:34:27 -05:00
broken waypoint, but fixed line numbers with the new JS comments
This commit is contained in:
@@ -6,4 +6,4 @@ if happy and knows_it
|
||||
|
||||
date: if friday then sue else jill.
|
||||
|
||||
expensive ||= do_the_math()
|
||||
expensive ||: do_the_math()
|
||||
22
documentation/cs/overview.cs
Normal file
22
documentation/cs/overview.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
# Assignment:
|
||||
number: 42
|
||||
opposite_day: true
|
||||
|
||||
# Conditions:
|
||||
number: -42 if opposite_day
|
||||
|
||||
# Functions:
|
||||
square: x => x * x.
|
||||
|
||||
# Arrays:
|
||||
list: [1, 2, 3, 4, 5]
|
||||
|
||||
# Objects:
|
||||
math: {
|
||||
root: Math.sqrt
|
||||
square: square
|
||||
cube: x => x * square(x).
|
||||
}
|
||||
|
||||
# Array comprehensions:
|
||||
cubed_list: math.cube(num) for num in list.
|
||||
@@ -2,6 +2,6 @@ try
|
||||
all_hell_breaks_loose()
|
||||
cats_and_dogs_living_together()
|
||||
catch error
|
||||
print( error )
|
||||
print(error)
|
||||
finally
|
||||
clean_up().
|
||||
Reference in New Issue
Block a user