A minimalistic programming language written in C89.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

27 rader
673 B

fn print_n_utf8 do
print_n_utf8_impl drop
end
# Clones an array, creating a new array
#
# @param array The array to clone into a new array
# @return a new array that contains the same elements as the source array
#
# array -> new_array
fn array.clone do
array.new 2 pluck array.size 0
# array new_array end it
2 pluck 2 pluck == l jump_if
# array new_array end it
loop:
dup 5 pluck
# array new_array end it it array
array.index 4 pluck
# array new_array end it v new_array
array.push
# array new_array end it
1 +
2 pluck 2 pluck > loop jump_if
l: drop drop swap drop
# new_array
end