k-user AT lists.cs.illinois.edu
Subject: K-user mailing list
List archive
- From: Derek Sorensen <derek AT pyrofex.net>
- To: k-user AT lists.cs.illinois.edu
- Subject: [[K-user] ] Choose something in the middle of a list
- Date: Wed, 15 Aug 2018 16:19:31 -0600
- Authentication-results: illinois.edu; spf=pass smtp.mailfrom=derek AT pyrofex.net; dkim=pass header.d=pyrofex-net.20150623.gappssmtp.com header.s=20150623; dmarc=none
Hi all,
I’m trying to tell K5 to choose an element of a list, saying that it could be
anywhere in the list. In K3.4 I could just write as a pattern
ListHead:List ListItem(X) ListTail:List
and K would match this pattern if X was anywhere in the list, since ListHead
or ListTail could be potentially empty. K5 doesn’t let me do that; it returns
an error saying “Unsupported associative matching on list.” Is there any way
to choose something out of a list without needing it to be the first or last
element?
Thanks,
Derek
Attachment:
signature.asc
Description: Message signed with OpenPGP
- [[K-user] ] Choose something in the middle of a list, Derek Sorensen, 08/15/2018
- RE: [[K-user] ] Choose something in the middle of a list, Chen, Xiaohong, 08/15/2018
Archive powered by MHonArc 2.6.19.