* f2S
* This method implements the function logic of the CAL function Cal.Collections.List.span
*/
public final RTValue f2S(RTValue predicate, RTValue list, RTExecutionContext $ec) throws CALExecutorException {
// Top level supercombinator logic
TYPE_List $case1;
switch (($case1 = (((TYPE_List)(java.lang.Object)list.getValue()))).getOrdinalValue()) {
case 0: {
// Cal.Core.Prelude.Nil
return
RTRecordValue.makeTupleRecord(
new RTValue[] {Span.i_Nil, Span.i_Nil});
}
case 1: {
// Cal.Core.Prelude.Cons
// Decompose data type to access members.
RTValue listHead = $case1.get_head();
RTValue listTail = $case1.get_tail();
if (predicate.f1L(listHead, $ec).evaluate($ec).getBooleanValue()) {
RTValue letVar_spanListTail =
Span.spanListTail$5$def_Lazy(predicate, listTail, $ec);