[過去ログ]
プログラミングのお題スレ Part13 (1002レス)
プログラミングのお題スレ Part13 http://mevius.5ch.net/test/read.cgi/tech/1549160513/
上
下
前次
1-
新
通常表示
512バイト分割
レス栞
抽出解除
レス栞
このスレッドは過去ログ倉庫に格納されています。
次スレ検索
歴削→次スレ
栞削→次スレ
過去ログメニュー
282: デフォルトの名無しさん [] 2019/02/21(木) 19:27:21.23 ID:2zdYL4u2 >>279 Haskell main = putStrLn.concat.concat $ [map addCanma (init lst),["and,"],[last lst]] addCanma s = s ++ "," lst = ["apple","banana","orange","mango"] output: apple,banana,orange,and,mango http://mevius.5ch.net/test/read.cgi/tech/1549160513/282
299: デフォルトの名無しさん [sage] 2019/02/21(木) 23:36:37.11 ID:un6uIa3F >>282 Perl5 sub f { my $a = shift; @_ ? (@_ > 1 ? "$a, " : "$a and ").f(@_) : $a } use feature say; say f(qw[red green black white]); say f(qw[apple banana]); say f(qw[one]); 実行結果 ~ $ perl 13_279_and.pl red, green, black and white apple and banana one http://mevius.5ch.net/test/read.cgi/tech/1549160513/299
メモ帳
(0/65535文字)
上
下
前次
1-
新
書
関
写
板
覧
索
設
栞
歴
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.053s