Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: When is none not none?

From: jonkelly:fastmail:fm at: 26-Jul-2007 23:56

and this is the not working version REBOL [ Title: "Binary tree insertion with terminals = none" Date: 2-Jul-2007 File: %t2.r Author: "Jonathan Kelly" Version: 0.0.1 ] add: func [ blk val ] [ print [ "add" blk type? blk blk = none val] either blk = none [ print "at A" compose [ (val) none none ] ] [ either blk/1 = val [ print "at equals" blk ] [ either val > blk/1 [ print "at greater" poke blk 3 (add blk/3 val) ] [ print "at less" poke blk 2 (add blk/2 val) ] blk ] ] ] tt: add none "c" prin [ "tt is " ] probe tt print [] tt: add tt "b" prin [ "tt is " ] probe tt print [] tt: add tt "e" prin [ "tt is " ] probe tt print [] tt: add tt "d" prin [ "tt is " ] probe tt print []