内置方案以检查列表是否包含 [英] Scheme built-in to check list containment

查看:63
本文介绍了内置方案以检查列表是否包含的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Python中,我可以执行列表中的x"以查看列表中是否包含x. Scheme中是否有任何等效的内置功能可以做到这一点?

In Python I can do "x in list" to see if the list contains x. Is there any equivalent built-in in Scheme to do this?

推荐答案

R5RS 和R6RS

The R5RS, and the R6RS standard library for lists define memq, memv, and member which can be used for that purpose.

这篇关于内置方案以检查列表是否包含的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆