This commit is contained in:
Ingy döt Net 2013-04-10 21:29:02 -07:00
parent 764da6cbbb
commit db842d013d
19005 changed files with 197040 additions and 7 deletions

View file

@ -0,0 +1,13 @@
def class Foo {
"""
This is a docstring. Every object in Fancy can have it's own docstring.
Either defined in the source code, like this one, or by using the Object#docstring: method
"""
def a_method {
"""
Same for methods. They can have docstrings, too.
"""
}
}
Foo docstring println # prints docstring Foo class
Foo instance_method: 'a_method . docstring println # prints method's docstring

View file

@ -0,0 +1,24 @@
NB. =========================================================
NB.*apply v apply verb x to y
apply=: 128!:2
NB. =========================================================
NB.*def c : (explicit definition)
def=: :
NB.*define a : 0 (explicit definition script form)
define=: : 0
NB.*do v name for ".
do=: ".
NB.*drop v name for }.
drop=: }.
Note 1
Note accepts multi-line descriptions.
Definitions display the source.
)
usleep
3 : '''libc.so.6 usleep > i i''&(15!:0) >.y'

View file

@ -0,0 +1,5 @@
f[x_,y_] := x + y (* Function comment : adds two numbers *)
f::usage = "f[x,y] gives the sum of x and y"
?f
-> f[x,y] gives the sum of x and y