Jump to content

Range extraction: Difference between revisions

Line 3,786:
endwhile
8 tochar dup print print " " print</lang>
 
PicoLisp like version
 
<lang Phixmonti>include ..\Utilitys.pmt
 
def glue /# l o -- l #/
var ob
len 2 * 1 - 2 swap 2 3 tolist for
ob swap put
endfor
enddef
 
def pop /# l -- h t #/
head swap tail nip
enddef
 
( )
 
( 0 1 2 4 6 7 8 11 12 14
15 16 17 18 19 20 21 22 23 24
25 27 28 29 30 31 32 33 35 36
37 38 39 )
 
len for drop
pop swap dup var N var M
len for drop
head M 1 + == if
pop swap var M
else
exitfor
endif
endfor
swap
N M == if N tostr 0 put else
N 1 + M == if N tostr 0 put M tostr 0 put else
N tostr "-" M tostr chain chain 0 put
endif
endif
swap
len 0 == if
drop
exitfor
endif
endfor
 
", " glue lprint</lang>
 
=={{header|PicoLisp}}==
672

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.