nth-unsafe ( n seq -- elt ) (original) (raw)
USING: accessors alien.c-types kernel math raylib
sequences.private specialized-arrays.instances.raylib.BoneInfo ;
M: BoneInfo-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ BoneInfo alien-element
; inline
USING: accessors alien.c-types elf kernel math sequences.private
specialized-arrays.instances.elf.Elf32_Phdr ;
M: Elf32_Phdr-array nth-unsafe
[ integer>fixnum ] dip
underlying>> \ Elf32_Phdr alien-element ; inline
USING: accessors alien.c-types elf kernel math sequences.private
specialized-arrays.instances.elf.Elf32_Shdr ;
M: Elf32_Shdr-array nth-unsafe
[ integer>fixnum ] dip
underlying>> \ Elf32_Shdr alien-element ; inline
USING: accessors alien.c-types elf kernel math sequences.private
specialized-arrays.instances.elf.Elf32_Sym ;
M: Elf32_Sym-array nth-unsafe
[ integer>fixnum ] dip
underlying>> \ Elf32_Sym alien-element ; inline
USING: accessors alien.c-types elf kernel math sequences.private
specialized-arrays.instances.elf.Elf64_Phdr ;
M: Elf64_Phdr-array nth-unsafe
[ integer>fixnum ] dip
underlying>> \ Elf64_Phdr alien-element ; inline
USING: accessors alien.c-types elf kernel math sequences.private
specialized-arrays.instances.elf.Elf64_Shdr ;
M: Elf64_Shdr-array nth-unsafe
[ integer>fixnum ] dip
underlying>> \ Elf64_Shdr alien-element ; inline
USING: accessors alien.c-types elf kernel math sequences.private
specialized-arrays.instances.elf.Elf64_Sym ;
M: Elf64_Sym-array nth-unsafe
[ integer>fixnum ] dip
underlying>> \ Elf64_Sym alien-element ; inline
USING: accessors alien.c-types kernel math raylib
sequences.private specialized-arrays.instances.raylib.Material ;
M: Material-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ Material alien-element
; inline
USING: accessors alien.c-types kernel math raylib
sequences.private
specialized-arrays.instances.raylib.MaterialMap ;
M: MaterialMap-array nth-unsafe
[ integer>fixnum ] dip
underlying>> \ MaterialMap alien-element ; inline
USING: accessors alien.c-types kernel math raylib
sequences.private specialized-arrays.instances.raylib.Matrix ;
M: Matrix-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ Matrix alien-element ;
inline
USING: accessors alien.c-types kernel math raylib
sequences.private specialized-arrays.instances.raylib.Mesh ;
M: Mesh-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ Mesh alien-element ;
inline
USING: accessors alien.c-types kernel math raylib
sequences.private specialized-arrays.instances.raylib.Vector2 ;
M: Vector2-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ Vector2 alien-element
; inline
USING: accessors kernel raylib sequences.private ;
M: Vector2 nth-unsafe swap 0 = [ x>> ] [ y>> ] if ;
USING: accessors alien.c-types kernel math raylib
sequences.private specialized-arrays.instances.raylib.Vector3 ;
M: Vector3-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ Vector3 alien-element
; inline
USING: accessors combinators kernel raylib sequences.private ;
M: Vector3 nth-unsafe
swap { { 0 [ x>> ] } { 1 [ y>> ] } { 2 [ z>> ] } } case ;
USING: accessors combinators kernel raylib sequences.private ;
M: Vector4 nth-unsafe
swap
{ { 0 [ x>> ] } { 1 [ y>> ] } { 2 [ z>> ] } { 3 [ w>> ] } }
case ;
USING: arrays kernel math sequences.private ;
M: array nth-unsafe [ integer>fixnum ] dip array-nth ; inline
USING: generic kernel math.bits sequences.private ;
M: binary-bits nth-unsafe
M\ binary-bits nth-unsafe (call-next-method) 1 0 ? ; inline
USING: bit-arrays bit-arrays.private kernel math
sequences.private ;
M: bit-array nth-unsafe bit-index nth-unsafe swap bit? ; inline
USING: accessors kernel math math.bits sequences.private ;
M: bits nth-unsafe number>> swap bit? ; inline
USING: accessors alien alien.c-types combinators kernel math
math.blas.matrices math.blas.vectors math.blas.vectors.private
sequences.private ;
M: blas-matrix-rowcol-sequence nth-unsafe
{
[
[ rowcol-jump>> ]
[ parent>> element-type heap-size ]
[ parent>> underlying>> ] tri [ * * ] dip
]
[ rowcol-length>> ]
[ inc>> ]
[ parent>> ]
} cleave (blas-vector-like) ;
USING: accessors alien.c-types benchmark.nbody-simd kernel math
sequences.private
specialized-arrays.instances.benchmark.nbody-simd.body ;
M: body-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ body alien-element ;
inline
USING: accessors alien.c-types gpu.demos.bunny kernel math
sequences.private
specialized-arrays.instances.gpu.demos.bunny.bunny-vertex-struct
;
M: bunny-vertex-struct-array nth-unsafe
[ integer>fixnum ] dip
underlying>> \ bunny-vertex-struct alien-element ; inline
USING: alien.accessors byte-arrays kernel math sequences.private
;
M: byte-array nth-unsafe
swap integer>fixnum alien-unsigned-1 ; inline
USING: accessors alien.c-types kernel math sequences.private
specialized-arrays.instances.alien.c-types.c-string ;
M: c-string-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ c-string alien-element
; inline
USING: cpu.architecture generic kernel math.vectors.simd
math.vectors.simd.intrinsics math.vectors.simd.private
sequences.private ;
M: char-16 nth-unsafe
swap \ char-16-rep
[ (simd-select) ]
[ M\ char-16 nth-unsafe (call-next-method) ] vx->x-op ;
inline
USING: accessors alien.c-types kernel math sequences.private
specialized-arrays.instances.alien.c-types.char ;
M: char-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ char alien-element ;
inline
USING: grouping.private sequences.private ;
M: chunking nth-unsafe group@ ; inline
USING: accessors assocs kernel sequences.private tools.memory
tools.memory.private ;
M: code-blocks nth-unsafe
[ cache>> ] [ blocks>> ] bi
[ nth-unsafe ] curry cache ; inline
USING: accessors kernel math.combinatorics sequences.private ;
M: combinations nth-unsafe [ seq>> ] [ k>> ] bi combination ;
USING: sequences.complex-components
sequences.complex-components.private sequences.private ;
M: complex-components nth-unsafe
complex-components@ nth-unsafe complex-component ;
USING: accessors alien.c-types alien.complex kernel math
sequences.private
specialized-arrays.instances.alien.complex.complex-double ;
M: complex-double-array nth-unsafe
[ integer>fixnum ] dip
underlying>> \ complex-double alien-element ; inline
USING: accessors alien.c-types alien.complex kernel math
sequences.private
specialized-arrays.instances.alien.complex.complex-float ;
M: complex-float-array nth-unsafe
[ integer>fixnum ] dip
underlying>> \ complex-float alien-element ; inline
USING: kernel math sequences.complex sequences.complex.private
sequences.private ;
M: complex-sequence nth-unsafe
complex@ [ nth-unsafe ] [ [ 1 + ] dip nth-unsafe ] 2bi rect>
;
USING: accessors alien.c-types chipmunk.ffi kernel math
sequences.private
specialized-arrays.instances.chipmunk.ffi.cpContact ;
M: cpContact-array nth-unsafe
[ integer>fixnum ] dip
underlying>> \ cpContact alien-element ; inline
USING: accessors alien.c-types chipmunk.ffi kernel math
sequences.private
specialized-arrays.instances.chipmunk.ffi.cpPolyShapeAxis ;
M: cpPolyShapeAxis-array nth-unsafe
[ integer>fixnum ] dip
underlying>> \ cpPolyShapeAxis alien-element ; inline
USING: accessors alien.c-types chipmunk.ffi kernel math
sequences.private
specialized-arrays.instances.chipmunk.ffi.cpVect ;
M: cpVect-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ cpVect alien-element ;
inline
USING: accessors alien.data.map.private combinators math
sequences.private ;
M: data-map-param nth-unsafe
{
[ iter-length>> * >fixnum ]
[ bytes>> ]
[ count>> ]
[ c-type>> ]
} cleave ; inline
USING: cpu.architecture generic kernel math.vectors.simd
math.vectors.simd.intrinsics math.vectors.simd.private
sequences.private ;
M: double-2 nth-unsafe
swap \ double-2-rep
[ (simd-select) ]
[ M\ double-2 nth-unsafe (call-next-method) ] vx->x-op ;
inline
USING: accessors alien.c-types kernel math
math.vectors.simd.cords sequences.private
specialized-arrays.instances.math.vectors.simd.cords.double-4 ;
M: double-4-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ double-4 alien-element
; inline
USING: accessors alien.c-types kernel math sequences.private
specialized-arrays.instances.alien.c-types.double ;
M: double-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ double alien-element ;
inline
USING: accessors arrays assocs kernel sequences.private ;
M: enumerated nth-unsafe dupd seq>> nth-unsafe 2array ; inline
USING: kernel sequences.private ;
USING: accessors alien.c-types kernel macho math
sequences.private specialized-arrays.instances.macho.fat_arch ;
M: fat_arch-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ fat_arch alien-element
; inline
USING: accessors alien.c-types fftw.ffi kernel math
sequences.private
specialized-arrays.instances.fftw.ffi.fftw_complex ;
M: fftw_complex-array nth-unsafe
[ integer>fixnum ] dip
underlying>> \ fftw_complex alien-element ; inline
USING: accessors alien.c-types kernel math math.vectors.simd
sequences.private
specialized-arrays.instances.math.vectors.simd.float-4 ;
M: float-4-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ float-4 alien-element
; inline
USING: cpu.architecture generic kernel math.vectors.simd
math.vectors.simd.intrinsics math.vectors.simd.private
sequences.private ;
M: float-4 nth-unsafe
swap \ float-4-rep
[ (simd-select) ]
[ M\ float-4 nth-unsafe (call-next-method) ] vx->x-op ;
inline
USING: accessors alien.c-types kernel math sequences.private
specialized-arrays.instances.alien.c-types.float ;
M: float-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ float alien-element ;
inline
USING: accessors alien.c-types game.loop.benchmark kernel math
sequences.private
specialized-arrays.instances.game.loop.benchmark.game-loop-benchmark
;
M: game-loop-benchmark-array nth-unsafe
[ integer>fixnum ] dip
underlying>> \ game-loop-benchmark alien-element ; inline
USING: accessors growable sequences.private ;
M: growable nth-unsafe underlying>> nth-unsafe ; inline
USING: accessors alien.c-types kernel math math.floats.half
sequences.private
specialized-arrays.instances.math.floats.half.half ;
M: half-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ half alien-element ;
inline
USING: cpu.architecture generic kernel math.vectors.simd
math.vectors.simd.intrinsics math.vectors.simd.private
sequences.private ;
M: int-4 nth-unsafe
swap \ int-4-rep
[ (simd-select) ] [ M\ int-4 nth-unsafe (call-next-method) ]
vx->x-op ; inline
USING: accessors alien.c-types kernel math sequences.private
specialized-arrays.instances.alien.c-types.int ;
M: int-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ int alien-element ;
inline
USING: accessors alien.c-types kernel math sequences.private
specialized-arrays.instances.alien.c-types.int32_t ;
M: int32_t-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ int32_t alien-element
; inline
USING: accessors kernel math sequences.interleaved
sequences.private ;
M: interleaved nth-unsafe
over even?
[ [ 2/ ] [ seq>> ] bi* nth-unsafe ] [ nip elt>> ] if ;
USING: kernel sequences sequences.private ;
M: iota nth-unsafe drop ; inline
USING: accessors kernel math math.combinatorics
math.combinatorics.private sequences sequences.private ;
M: k-permutations nth-unsafe
[ skip>> * ] [ seq>> [ permutation-indices ] keep ]
[ k>> swap [ head ] dip nths-unsafe ] tri ;
USING: accessors alien.c-types io.files.acls.macos.ffi kernel
math sequences.private
specialized-arrays.instances.io.files.acls.macos.ffi.kauth_ace ;
M: kauth_ace-array nth-unsafe
[ integer>fixnum ] dip
underlying>> \ kauth_ace alien-element ; inline
USING: accessors alien.c-types kernel math sequences.private
specialized-arrays.instances.unix.kqueue.kevent unix.kqueue ;
M: kevent-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ kevent alien-element ;
inline
USING: accessors game.input.dinput.keys-array sequences.private
;
M: keys-array nth-unsafe underlying>> nth-unsafe >key ;
USING: accessors alien.c-types kernel libusb math
sequences.private
specialized-arrays.instances.libusb.libusb_iso_packet_descriptor
;
M: libusb_iso_packet_descriptor-array nth-unsafe
[ integer>fixnum ] dip
underlying>> \ libusb_iso_packet_descriptor alien-element ;
inline
USING: accessors alien.c-types kernel math sequences.private
specialized-arrays.instances.alien.c-types.long ;
M: long-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ long alien-element ;
inline
USING: cpu.architecture generic kernel math.vectors.simd
math.vectors.simd.intrinsics math.vectors.simd.private
sequences.private ;
M: longlong-2 nth-unsafe
swap \ longlong-2-rep
[ (simd-select) ]
[ M\ longlong-2 nth-unsafe (call-next-method) ] vx->x-op ;
inline
USING: accessors alien.c-types kernel math sequences.private
specialized-arrays.instances.alien.c-types.longlong ;
M: longlong-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ longlong alien-element
; inline
USING: accessors math.matrices.simd sequences.private ;
M: matrix4 nth-unsafe columns>> nth-unsafe ; inline
USING: accessors kernel math math.matrices.laplace.private
sequences.private ;
M: missing nth-unsafe
[ i>> dupd >= [ 1 + ] when ] [ seq>> nth-unsafe ] bi ;
USING: sequences.modified sequences.private ;
M: modified nth-unsafe modified-nth ;
USING: kernel math named-tuples sequences.private ;
M: named-tuple nth-unsafe [ integer>fixnum ] dip array-nth ;
USING: nibble-arrays nibble-arrays.private sequences.private ;
M: nibble-array nth-unsafe nibble@ nth-unsafe get-nibble ;
USING: accessors alien.c-types kernel macho math
sequences.private specialized-arrays.instances.macho.nlist ;
M: nlist-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ nlist alien-element ;
inline
USING: accessors alien.c-types kernel macho math
sequences.private specialized-arrays.instances.macho.nlist_64 ;
M: nlist_64-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ nlist_64 alien-element
; inline
USING: accessors kernel math math.order sequences
sequences.padded sequences.private ;
M: padded-head nth-unsafe
[ [ length>> ] [ underlying>> ] bi [ length [-] - ] keep ]
keep 2over bounds-check?
[ drop nth-unsafe ] [ 2nip elt>> ] if ;
USING: accessors kernel sequences sequences.padded
sequences.private ;
M: padded-tail nth-unsafe
[ underlying>> ] keep 2over bounds-check?
[ drop nth-unsafe ] [ 2nip elt>> ] if ;
USING: accessors alien.c-types kernel math papier.map
sequences.private
specialized-arrays.instances.papier.map.papier-vertex-struct ;
M: papier-vertex-struct-array nth-unsafe
[ integer>fixnum ] dip
underlying>> \ papier-vertex-struct alien-element ; inline
USING: accessors alien.c-types fluids kernel math
sequences.private specialized-arrays.instances.fluids.particle_t
;
M: particle_t-array nth-unsafe
[ integer>fixnum ] dip
underlying>> \ particle_t alien-element ; inline
USING: accessors math.combinatorics sequences.private ;
M: permutations nth-unsafe seq>> permutation ;
USING: accessors kernel math persistent.vectors
persistent.vectors.private sequences.private ;
M: persistent-vector nth-unsafe
2dup tail-offset >= [ tail>> ] [ root>> body-nth ] if
node-nth ;
USING: benchmark.tuple-arrays sequences.private
tuple-arrays.private ;
M: point-array nth-unsafe tuple-slice \ point read-tuple ;
inline
USING: accessors alien.c-types benchmark.struct-arrays kernel
math sequences.private
specialized-arrays.instances.benchmark.struct-arrays.point ;
M: point-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ point alien-element ;
inline
USING: accessors kernel math sequences.prefixed
sequences.private ;
M: prefixed nth-unsafe
over zero?
[ nip elt>> ] [ [ 1 - ] [ seq>> ] bi* nth-unsafe ] if ;
USING: accessors grouping.extras kernel math sequences
sequences.private ;
M: prefixes nth-unsafe seq>> swap 1 + head-slice ;
USING: accessors gml.types sequences.private ;
M: proc nth-unsafe array>> nth-unsafe ;
USING: accessors quotations sequences.private ;
M: quotation nth-unsafe array>> nth-unsafe ;
USING: accessors kernel math ranges sequences.private ;
M: range nth-unsafe [ step>> * ] keep from>> + ; inline
USING: accessors kernel sequences sequences.private ;
M: repetition nth-unsafe nip elt>> ; inline
USING: accessors alien.c-types kernel math rlgl
sequences.private specialized-arrays.instances.rlgl.rlDrawCall ;
M: rlDrawCall-array nth-unsafe
[ integer>fixnum ] dip
underlying>> \ rlDrawCall alien-element ; inline
USING: accessors alien.c-types kernel math rlgl
sequences.private
specialized-arrays.instances.rlgl.rlVertexBuffer ;
M: rlVertexBuffer-array nth-unsafe
[ integer>fixnum ] dip
underlying>> \ rlVertexBuffer alien-element ; inline
USING: accessors kernel math project-euler.059.private sequences
sequences.private ;
M: rollover nth-unsafe seq>> [ length mod ] keep nth-unsafe ;
USING: accessors alien.c-types kernel macho math
sequences.private specialized-arrays.instances.macho.section ;
M: section-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ section alien-element
; inline
USING: accessors alien.c-types kernel macho math
sequences.private specialized-arrays.instances.macho.section_64
;
M: section_64-array nth-unsafe
[ integer>fixnum ] dip
underlying>> \ section_64 alien-element ; inline
USING: sequences sequences.private ;
M: sequence nth-unsafe nth ; inline
USING: accessors arrays.shaped sequences.private ;
M: shaped-array nth-unsafe underlying>> nth-unsafe ;
USING: accessors kernel math sequences sequences.private
sequences.shifted ;
M: shifted nth-unsafe
[ n>> neg + ] [ underlying>> ] [ ] tri 2over bounds-check?
[ drop nth-unsafe ] [ 2nip fill>> ] if ;
USING: cpu.architecture generic kernel math.vectors.simd
math.vectors.simd.intrinsics math.vectors.simd.private
sequences.private ;
M: short-8 nth-unsafe
swap \ short-8-rep
[ (simd-select) ]
[ M\ short-8 nth-unsafe (call-next-method) ] vx->x-op ;
inline
USING: accessors alien.c-types kernel math sequences.private
specialized-arrays.instances.alien.c-types.short ;
M: short-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ short alien-element ;
inline
USING: accessors alien.c-types kernel math sequences.private
specialized-arrays.instances.alien.c-types.size_t ;
M: size_t-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ size_t alien-element ;
inline
USING: accessors alien.c-types kernel math sequences.private
specialized-arrays.instances.unix.statfs.macos.statfs64
unix.statfs.macos ;
M: statfs64-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ statfs64 alien-element
; inline
USING: kernel math sequences.private strings strings.private ;
M: string nth-unsafe [ integer>fixnum ] dip string-nth ; inline
USING: accessors kernel sequences sequences.private
sequences.suffixed ;
M: suffixed nth-unsafe
[ seq>> 2dup bounds-check? ] 1check
[ drop nth-unsafe ] [ 2nip elt>> ] if ;
USING: accessors grouping.extras kernel sequences
sequences.private ;
M: suffixes nth-unsafe seq>> swap tail-slice ;
USING: accessors kernel sequences.private xml.data ;
M: tag nth-unsafe [ children>> ] call \ nth-unsafe execute ;
USING: accessors sequences.private tensors tensors.private ;
M: tensor nth-unsafe num-index vec>> nth-unsafe ;
USING: accessors alien.c-types kernel math ogg.theora
sequences.private
specialized-arrays.instances.ogg.theora.th-quant-ranges ;
M: th-quant-ranges-array nth-unsafe
[ integer>fixnum ] dip
underlying>> \ th-quant-ranges alien-element ; inline
USING: accessors calendar calendar.ranges kernel
sequences.private ;
M: timestamp-range nth-unsafe
[ step>> duration* ] keep from>> time+ ;
USING: accessors alien.c-types kernel math sequences.private
specialized-arrays.instances.unix.time.timeval unix.time ;
M: timeval-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ timeval alien-element
; inline
USING: accessors alien.c-types kernel math sequences.private
specialized-arrays.instances.alien.c-types.u16 ;
M: u16-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ u16 alien-element ;
inline
USING: accessors alien.c-types kernel math sequences.private
specialized-arrays.instances.alien.c-types.u32 ;
M: u32-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ u32 alien-element ;
inline
USING: accessors alien.c-types kernel math sequences.private
specialized-arrays.instances.alien.c-types.u64 ;
M: u64-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ u64 alien-element ;
inline
USING: accessors alien.c-types kernel math sequences.private
specialized-arrays.instances.alien.c-types.u8 ;
M: u8-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ u8 alien-element ;
inline
USING: accessors alien.c-types kernel math math.vectors.simd
sequences.private
specialized-arrays.instances.math.vectors.simd.uchar-16 ;
M: uchar-16-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ uchar-16 alien-element
; inline
USING: cpu.architecture generic kernel math.vectors.simd
math.vectors.simd.intrinsics math.vectors.simd.private
sequences.private ;
M: uchar-16 nth-unsafe
swap \ uchar-16-rep
[ (simd-select) ]
[ M\ uchar-16 nth-unsafe (call-next-method) ] vx->x-op ;
inline
USING: accessors alien.c-types kernel math sequences.private
specialized-arrays.instances.alien.c-types.uchar ;
M: uchar-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ uchar alien-element ;
inline
USING: accessors alien.c-types kernel math math.vectors.simd
sequences.private
specialized-arrays.instances.math.vectors.simd.uint-4 ;
M: uint-4-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ uint-4 alien-element ;
inline
USING: cpu.architecture generic kernel math.vectors.simd
math.vectors.simd.intrinsics math.vectors.simd.private
sequences.private ;
M: uint-4 nth-unsafe
swap \ uint-4-rep
[ (simd-select) ]
[ M\ uint-4 nth-unsafe (call-next-method) ] vx->x-op ;
inline
USING: accessors alien.c-types kernel math sequences.private
specialized-arrays.instances.alien.c-types.uint ;
M: uint-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ uint alien-element ;
inline
USING: accessors alien.c-types kernel math sequences.private
specialized-arrays.instances.alien.c-types.uint16_t ;
M: uint16_t-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ uint16_t alien-element
; inline
USING: accessors alien.c-types kernel math sequences.private
specialized-arrays.instances.alien.c-types.uint32_t ;
M: uint32_t-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ uint32_t alien-element
; inline
USING: accessors alien.c-types kernel math sequences.private
specialized-arrays.instances.alien.c-types.uint64_t ;
M: uint64_t-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ uint64_t alien-element
; inline
USING: accessors alien.c-types kernel math sequences.private
specialized-arrays.instances.alien.c-types.uint8_t ;
M: uint8_t-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ uint8_t alien-element
; inline
USING: accessors alien.c-types kernel math sequences.private
specialized-arrays.instances.alien.c-types.uintptr_t ;
M: uintptr_t-array nth-unsafe
[ integer>fixnum ] dip
underlying>> \ uintptr_t alien-element ; inline
USING: accessors alien.c-types kernel math sequences.private
specialized-arrays.instances.alien.c-types.ulong ;
M: ulong-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ ulong alien-element ;
inline
USING: cpu.architecture generic kernel math.vectors.simd
math.vectors.simd.intrinsics math.vectors.simd.private
sequences.private ;
M: ulonglong-2 nth-unsafe
swap \ ulonglong-2-rep
[ (simd-select) ]
[ M\ ulonglong-2 nth-unsafe (call-next-method) ] vx->x-op ;
inline
USING: accessors alien.c-types kernel math sequences.private
specialized-arrays.instances.alien.c-types.ulonglong ;
M: ulonglong-array nth-unsafe
[ integer>fixnum ] dip
underlying>> \ ulonglong alien-element ; inline
USING: cpu.architecture generic kernel math.vectors.simd
math.vectors.simd.intrinsics math.vectors.simd.private
sequences.private ;
M: ushort-8 nth-unsafe
swap \ ushort-8-rep
[ (simd-select) ]
[ M\ ushort-8 nth-unsafe (call-next-method) ] vx->x-op ;
inline
USING: accessors alien.c-types kernel math sequences.private
specialized-arrays.instances.alien.c-types.ushort ;
M: ushort-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ ushort alien-element ;
inline
USING: sequences sequences.private ;
M: virtual-sequence nth-unsafe virtual@ nth-unsafe ; inline
USING: accessors arrays kernel sequences.extras
sequences.private ;
M: virtual-zip-index nth-unsafe
over [ seq>> nth-unsafe ] [ 2array ] bi* ; inline
USING: accessors sequences.private vlists ;
M: vlist nth-unsafe vector>> nth-unsafe ;
USING: accessors alien.c-types kernel math sequences.private
specialized-arrays.instances.alien.c-types.void* ;
M: void*-array nth-unsafe
[ integer>fixnum ] dip underlying>> \ void* alien-element ;
inline
USING: accessors kernel math math.order sequences
sequences.private sequences.windowed ;
M: windowed-sequence nth-unsafe
[ 1 + ] dip [ n>> dupd [-] swap ] [ sequence>> ] bi
; inline
USING: accessors kernel sequences.private xml.data ;
M: xml-chunk nth-unsafe [ seq>> ] call \ nth-unsafe execute ;
USING: accessors kernel sequences.private xml.data ;
M: xml nth-unsafe [ body>> ] call \ nth-unsafe execute ;
USING: accessors kernel math sequences sequences.private zim ;
M:: zim-cluster nth-unsafe ( n cluster -- elt )
cluster offsets>> :> offsets cluster blobs>> :> blobs 0
offsets nth :> zero n offsets nth :> from n 1 + offsets nth
:> to from to [ zero - ] bi@ blobs subseq ;
USING: arrays kernel sequences.private zim ;
M: zim nth-unsafe
[
[ read-entry-index dup ] [ read-entry-content drop ] bi
2array
] with-zim ;
USING: accessors arrays kernel sequences.private
sequences.zipped ;
M: zipped nth-unsafe
[ keys>> nth-unsafe ] [ values>> nth-unsafe ] 2bi 2array ;