Unloading all functions from cache

Hi

I have a following function that i call from my main script in korn shell.

#Unset all functions from the cache

#/bin/ksh
#Unset all functions from the cache

init () {
for func in "$(ls)"
do
  echo "$func" 
  unset -f $func

if [$? -ne 0] ; then
return 1
fi

done 

}   

I want to know how to unit test this functions individually ?
As my main function just calls many functions like this.

if i go to directory and run init all by itself on command line i get

ksh[4]: unset: 0403-008 The number of parameters specified is not correct.

Any ideas on what i am doing wrong

1) Recommend that you do not call a script or a function "init". It is the name of the fundamental unix program which runs at the top of the process tree.

2) As posted the script does nothing. It is just a function and there is no code to call the function. There is also no code to put a value into "$ls" should someone call the function.

What did you type on the command line?
What is actually in the script?