summary refs log tree commit diff stats
path: root/ranger.py
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2012-08-02 04:27:16 +0200
committerhut <hut@lavabit.com>2012-08-02 04:27:16 +0200
commite4f37e51e91cc45b7660e3572a275c8dae6dbec9 (patch)
tree68ab689e46f012c9ab6a222385d8cadef53f7931 /ranger.py
parent176e8a684cb490393f84e7fdccc6aafda559364b (diff)
downloadranger-e4f37e51e91cc45b7660e3572a275c8dae6dbec9.tar.gz
container.settingobject: fixed type of hidden_filter
Diffstat (limited to 'ranger.py')
0 files changed, 0 insertions, 0 deletions
s revision' href='/akkartik/mu/blame/tangle.mu?h=hlt&id=ef7d834fdd826977cd8d43253052a7b8e1c5aa72'>^
72cf9948 ^
20d1c905 ^

72cf9948 ^
20d1c905 ^
72cf9948 ^
20d1c905 ^

72cf9948 ^
20d1c905 ^
72cf9948 ^






20d1c905 ^

1ead3562 ^
192d59d3 ^
d66e2783 ^
192d59d3 ^
20d1c905 ^

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
26
27
28
29
30
31
32
33
34
35
36
                                                      



                                                                           
                                                                   

                
                                   
             
             
                   

 
                         
                   
                    

 
                         
                               






                                   

 
          
                      
                                                                   
                              

 
# example program: constructing functions out of order
#
# We construct a factorial function with separate base and recursive cases.
# Compare factorial.mu.
#
# This isn't a very tasteful example, just a basic demonstration of
# possibilities.

def factorial n:num -> result:num [
  local-scope
  load-inputs
  <factorial-cases>
]

after <factorial-cases> [
  # if n=0 return 1
  return-unless n, 1
]

after <factorial-cases> [
  # return n * factorial(n - 1)
  {
    break-unless n
    x:num <- subtract n, 1
    subresult:num <- factorial x
    result <- multiply subresult, n
    return result
  }
]

def main [
  1:num <- factorial 5
  # trailing space in next line is to help with syntax highlighting
  $print [result: ], 1:num, [ 
]
]