! Copyright (C) 2007, 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: namespaces math words kernel assocs classes
-math.order kernel.private ;
+math.order kernel.private sequences sequences.private ;
IN: layouts
SYMBOL: data-alignment
dup most-negative-fixnum most-positive-fixnum between?
[ >fixnum ] [ >bignum ] if ; inline
+! we put this here so that it can use the references to
+! most-positive-fixnum otherwise would be in combinatrs
+M: iota hashcode*
+ over 0 <= [ 2drop 0 ] [
+ nip length [
+ 0 most-positive-fixnum clamp integer>fixnum
+ 0 swap [ sequence-hashcode-step ] each-integer
+ ] [
+ most-positive-fixnum swap
+ [ sequence-hashcode-step ] (each-integer)
+ ] bi
+ ] if ;
+
UNION: immediate fixnum POSTPONE: f ;