Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
17
Task/Vector/Factor/vector-3.factor
Normal file
17
Task/Vector/Factor/vector-3.factor
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
USING: kernel formatting prettyprint rosetta-code.vector
|
||||
sequences ;
|
||||
IN: rosetta-code.vector
|
||||
|
||||
: demo ( a b quot -- )
|
||||
3dup [ unparse ] tri@ rest but-last
|
||||
"%16s %16s%3s= " printf call . ; inline
|
||||
|
||||
VEC{ -8.4 1.35 } VEC{ 10 11/123 } [ v+ ] demo
|
||||
VEC{ 5 3 } VEC{ 4 2 } [ v- ] demo
|
||||
VEC{ 4 -8 } 2 [ v* ] demo
|
||||
VEC{ 5 7 } 2 [ v/ ] demo
|
||||
|
||||
! You can still make a vector without the literal syntax of
|
||||
! course.
|
||||
|
||||
5 2 <vec> 1.3 [ v* ] demo
|
||||
Loading…
Add table
Add a link
Reference in a new issue