first

Help Contents logo Mutators first
bl last

logo.first :x {:#1}


Definition:

to logo.first :x {:#1}
	if set? :x
	[ 
		if local? "#1
		[ 
			if :#1<0 [error "'Invalid second argument of "First"']
			make "#1 (count :x) - :#1
			while :#1 > 0 
			[ 
				delete word "x.# setmax :x
				make "#1 :#1 - 1
			]
			output :x 
		]
		[ 
			output :(word "x.# setmin :x) 
		]
	]
	[ 
		output dll.logo.logofirst 
	]
end

Examples:

References:

bl last