七周七语言 Erlang第一天编程习题解答

1. 写一个函数, 用递归返回字符串中的单词数。数组 -module(word). -export([word_count/1]). word_count([]) -> 1; word_count([32 | Rest]) -> 1 + word_count(Rest); word_count([First | Rest]) -> 0 + word_count(Rest). 这个题主要是erla
相关文章
相关标签/搜索