プログラミングのお題スレ Part15at TECH
プログラミングのお題スレ Part15 - 暇つぶし2ch1026:デフォルトの名無しさん
19/11/21 17:12:54.10 x85mexbT.net
>>988-989 Squeak Smalltalk。関数で。
| contents words fn |
contents := (HTTPClient httpGet: 'URLリンク(www.cs.cmu.edu)') contents.
words := (contents replaceAll: Character lf with: Character space; asTextFromHtml) asString subStrings: ' !"''()*,-.:;?`'.
words := words asSet asSortedArray.
fn := [:in | words select: [:word | word beginsWith: in]].
fn value: 'on'. "=> #('on' 'once' 'one' 'only') "
fn value: 'we'. "=> #('well' 'went' 'were') "
"for Pharo => URLリンク(ws.stfx.eu) "


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch