Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我只是在阅读我的教科书时想知道如何有人可以在方案中为初学者编写字符串小写?非常感谢!
我知道如何使用 map 来做到这一点,但我想知道是否有更基本的方法来做到这一点,以便计划初学者可以在不知道 map 做什么的情况下理解。谢谢!
这次我会写算法的大致思路,你现在应该知道如何使用模板来写了:
string->list
char-downcase
list->string
基本上我们正在映射字符串中的字符。有几种奇特的方法可以做到这一点,例如使用序列,或map等,但现在,我相信我们最好坚持基础并从头开始学习如何做到这一点。
map