First consider the case where the list has one element that matches the target:The base case is even simpler: for $target == 0 any list fulfills the condition, so a simple return 1 if $target == 0; should do.
In reply to Re^2: Recursion problem
by moritz
in thread Recursion problem
by someone202
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |