From 6567df27bb924d17a41b21ac012d88bfee4cbe34 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Tue, 18 Jun 2024 16:03:31 +0100 Subject: Added index function --- examples/sentences.fco | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'examples/sentences.fco') diff --git a/examples/sentences.fco b/examples/sentences.fco index afb2d4f..6b6e448 100644 --- a/examples/sentences.fco +++ b/examples/sentences.fco @@ -3,11 +3,7 @@ def classify(xs) def sentence_type(s) def ends_with?(s c) - if =(tail(s) "") - =(s c) - else - @ends_with?(tail(s) c) - end + =([](s -(size(s) 1)) c) end if ends_with?(s "?") +(s " -> Q") -- cgit v1.2.3