_SystemArray.dcl 644 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
definition module _SystemArray

class Array .a e where
	select				:: !.(a .e) !Int	-> .e
	uselect				:: !u:(a e) !Int	-> *(e, !u:(a e))
	size				:: !.(a .e)			-> Int
	usize				:: !u:(a .e)		-> *(!Int, !u:(a .e))
	update				:: !*(a .e) !Int .e -> *(a .e)	
	createArray			:: !Int e			-> *(a e)
	_createArray		:: !Int				-> *(a .e)
	replace				:: !*(a .e) !Int .e -> *(.e, !*(a .e))


instance Array {!} a

instance Array {#} Int
instance Array {#} Char
instance Array {#} Real
instance Array {#} Bool

instance Array {#} {#.a}
instance Array {#} {!.a}
instance Array {#} {.a}

instance Array {#} a

//instance Array {#} File

instance Array {} a