Play

Check-in [fd3d3efaf8]
Login
Overview
Comment:Add helper function to perform two quotations on a single value.
Timelines: family | ancestors | descendants | both | stdlib
Files: files | file ages | folders
SHA3-256: fd3d3efaf8d7e4999f8dcd823e20f68ed02365e6d9dadcf14b2fe342af062af2
User & Date: robin.hansen on 2021-04-08 14:08:49
Other Links: branch diff | manifest | tags
Context
2021-04-08
14:20
Add number functions. check-in: 9354cf1321 user: robin.hansen tags: stdlib
14:08
Add helper function to perform two quotations on a single value. check-in: fd3d3efaf8 user: robin.hansen tags: stdlib
14:02
Added booleans to stdlib. check-in: a22d52bc99 user: robin.hansen tags: stdlib
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Modified stdlib/src/core.play from [500707602c] to [ef80af9fad].

1
2
3
4

5
6
7
8
9
10
11
12
..
49
50
51
52
53
54
55









# Everything in core is imported into every module outside the standard library

def: test
: 5 6

  int= not
  [ 10 ]
  [ 20 ] if

# booleans

defunion: Bool
: True
................................................................................
def: over
type: a b -- a b a
: swap dup rotate

def: drop2
type: a b c -- a
: drop drop












|
>
|







 







>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
..
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Everything in core is imported into every module outside the standard library

def: test
: 4 
  [ 1 + ] [ 1 + ] split
  int=
  [ 10 ]
  [ 20 ] if

# booleans

defunion: Bool
: True
................................................................................
def: over
type: a b -- a b a
: swap dup rotate

def: drop2
type: a b c -- a
: drop drop

def: split
type: a [ a -- b ] [ a -- c ] -- b c
: -rotate dup # [] [] a a
  -rotate ! # [] a c
  swap -rotate # c a []
  ! # c b
  swap