Just another update

This commit is contained in:
Ingy döt Net 2015-02-20 00:35:01 -05:00
parent a25938f123
commit 00a190b0a6
6591 changed files with 94363 additions and 23227 deletions

View file

@ -0,0 +1,6 @@
user=> 3
3
user=> (Math/pow *1 2)
9.0
user=> (Math/pow *2 0.5)
1.7320508075688772

View file

@ -0,0 +1,2 @@
(*:, %:) 3
9 1.73205

View file

@ -0,0 +1,5 @@
>>> 3
3
>>> _*_, _**0.5
(9, 1.7320508075688772)
>>>

View file

@ -0,0 +1,6 @@
/*REXX pgm shows something close to a "topic variable" (for funcs/subs).*/
parse arg N /*get an arg from CL, maybe a 3? */
say mysub(N) ' ' /*invoke a function to square it.*/
exit /*stick a fork in it, we're done.*/
/*──────────────────────────────────MYSUB subroutine (function)─────────*/
mysub: return arg(1)**2 /*return the square of passed arg*/

View file

@ -0,0 +1,7 @@
while DATA.gets # assigns to $_ (local scope)
print # If no arguments are given, prints $_
end
__END__
This is line one
This is line two
This is line three

View file

@ -0,0 +1,4 @@
DATA.gets
p [$_.to_i ** 2, Math.sqrt($_.to_i)] #=> [9, 1.7320508075688772]
__END__
3

View file

@ -0,0 +1,7 @@
- 3.0;
val it = 3.0 : real
- it * it;
val it = 9.0 : real
- Math.sqrt it;
val it = 3.0 : real
-