about summary refs log tree commit diff stats
path: root/tests/unittests/test_cmd_account.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unittests/test_cmd_account.h')
0 files changed, 0 insertions, 0 deletions
7b8e1c5aa72'>ef7d834f ^
d55e7738 ^

a3195d44 ^


5059f32d ^
6e455985 ^

a3195d44 ^

6e455985 ^
a3195d44 ^
4a48bedc ^
5059f32d ^
6e455985 ^
a3195d44 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
                                                                             

                                                                            
 




                                              

                  


             
                                                                        

                                    

 
                             
             
             
                                         
          
 
# Example program showing that 'return-continuation-until-mark' can 'pause' a
# function call, returning a continuation, and that calling the continuation
# can 'resume' the paused function call.
#
# To run:
#   $ git clone https://github.com/akkartik/mu
#   $ cd mu
#   $ ./mu continuation1.mu
#
# Expected output:
#   1

def main [
  local-scope
  k:continuation <- call-with-continuation-mark 100/mark, create-yielder
  x:num <- call k  # should return 1
  $print x 10/newline
]

def create-yielder -> n:num [
  local-scope
  load-inputs
  return-continuation-until-mark 100/mark
  return 1
]