Next: serialisef Up: Beispiele in zwei Previous: inv

revise


rfi-p> 
style lisp
rfi-l> destroy
rfi-l> consult "/home/rfm/RFM/extensions/revise.rf"
; Reading file "/home/rfm/RFM/extensions/revise.rf" ..
rfi-l> listing
(ft (revise _f _n (tup))
    (tup) )
(ft (revise _f 1 (tup _h | _t))
    (tup (_f _h) | _t) )
(ft (revise _f _n (tup _h | _t))
    (tup _h | (revise _f (1- _n) _t)) )
rfi-l> style prolog
rfi-p> listing
revise(F, N, []) :-& tup().
revise(F, 1, [H | T]) :-& tup(F(H) | T).
revise(F, N, [H | T]) :-& tup(H | revise(F, 1-(N), T)).


Harold Boley & Michael Herfert (herfert@dfki.uni-kl.de)