! go in the set
[ t ] 2dip table>> set-nth ;
+<PRIVATE
+
+: ?set-nth ( elt n seq -- )
+ 2dup bounds-check? [ set-nth-unsafe ] [ 3drop ] if ; inline
+
+PRIVATE>
+
M: bit-set delete
! This isn't allowed to throw an error if the elt wasn't
! in the set
over integer? [
- table>> 2dup bounds-check? [
- [ f ] 2dip set-nth
- ] [ 2drop ] if
+ [ f ] 2dip table>> ?set-nth
] [ 2drop ] if ;
! If you do binary set operations with a bit-set, it's expected
HINTS: record-controller { controller-state alien } ;
-: ?set-nth ( value nth seq -- )
- 2dup bounds-check? [ set-nth-unsafe ] [ 3drop ] if ;
+: ?set-nth ( elt n seq -- )
+ 2dup bounds-check? [ set-nth-unsafe ] [ 3drop ] if ; inline
: record-keyboard ( keyboard-state value -- )
dup IOHIDValueGetElement dup keyboard-key? [
! the maximum unicode char in the first 3 planes
-: ?set-nth ( val index seq -- )
- 2dup bounds-check? [ set-nth ] [ 3drop ] if ;
+: ?set-nth ( elt n seq -- )
+ 2dup bounds-check? [ set-nth-unsafe ] [ 3drop ] if ; inline
:: fill-ranges ( table -- table )
name-map sort-values keys
: unvisited? ( cell -- ? ) first2 visited get ?nth ?nth ;
-: ?set-nth ( elt i seq -- )
- 2dup bounds-check? [ set-nth ] [ 3drop ] if ;
+<PRIVATE
+
+: ?set-nth ( elt n seq -- )
+ 2dup bounds-check? [ set-nth-unsafe ] [ 3drop ] if ; inline
+
+PRIVATE>
: visit ( cell -- ) f swap first2 visited get ?nth ?set-nth ;