aboutsummaryrefslogtreecommitdiff
path: root/examples/sentences.fco
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2024-06-18 16:03:31 +0100
committerJuan J. Martinez <jjm@usebox.net>2024-06-18 16:03:31 +0100
commit6567df27bb924d17a41b21ac012d88bfee4cbe34 (patch)
tree4d0250309f2cd287cf02cf5e7ee864d26aa58b44 /examples/sentences.fco
parent96362daa03ca36a94ca7c5939446f772d95229b5 (diff)
downloadfunco-6567df27bb924d17a41b21ac012d88bfee4cbe34.tar.gz
funco-6567df27bb924d17a41b21ac012d88bfee4cbe34.zip
Added index function
Diffstat (limited to 'examples/sentences.fco')
-rw-r--r--examples/sentences.fco6
1 files changed, 1 insertions, 5 deletions
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")