ABCDEFGHIJKLMNOPQRS
1
言語や関数はてきとうに追加してくださいね。Ruby 1.9.0C# 4 (LINQ)PythonHaskellScalaF#C++C++Java 8 (Stream)
2
↓この列は備考欄ということにしたい。Rubyのyieldは内部列挙方式LINQ (遅延評価)For Comprehension (遅延評価)Seq (遅延評価)Boost.Range (遅延評価)PStade.Oven (遅延評価)Stream (遅延評価)
3
all?AllallforallforallallforallallMatch
4
any?Anyanyexists, containsexistsexistsanyMatch
5
countCount/LongCountcountlengthsize/lengthlengthdistancesize/distancecount / collect(Collectors.counting())
6
count(elem)(\x -> length.filter x)count_if
7
count{|item| ... }countcountBy
8
cyclecyclecontinuallycycled
9
detectFirstOrDefaultfindfind(filtered)(filtered)findFirst
10
dropSkipdropdropskipdroppedskip
11
drop_whileSkipWhiledropwhiledropWhiledropWhileskipWhiledropped_while
12
pairwise
13
each_conswindowed
14
each_slice
15
each_with_indexzip [1..]zipWithIndex.foreach{...}indexed
16
entriesToArraytoArray/toList/...toArray / toListcopy_rangecopiedtoArray / collect(Collectors.toList())
17
findFirstOrDefaultfindfindfind / tryFindfindFirst
18
find_allWherefilterfilter, withFilterfilterfilteredfilteredfilter
19
find_indexfindIndexindexOffindIndex / tryFindIndex
20
firstFirstOrDefaultheadheadheadfrontfindFirst
21
first(n)Taketaketaketake / truncatetakenlimit
22
grepWherefilteredfilter
23
group_byGroupBygroupbygroupBygroupBycollect(Collectors.groupingBy)
24
include?Containselemcontains
25
map/collectSelectimapmapmapmaptransformedtransformed, elements, elements_cmap
26
Selectmapmapi
27
maxMaxmaximummaxmaxmax
28
比較関数を取るmax{|a, b| ... }maximumBymaxmax
29
変換関数を取るmax_byMaxmaxBymaxBycollect(Collectors.maxBy)
30
member?Containselemcontains
31
minMinminumumminminmin
32
比較関数を取るmin{|a, b| ... }minimumByminmin
33
変換関数を取るmin_byMinminByminBycollect(Collectors.minBy)
34
minmax
35
minmax_by
36
none?Anynot.orisEmptynoneMatch
37
one?Singlesingle
38
partitionToLookuppartitionList.partition / Array.partitionpartitionedcollect(Collectors.partitioningBy())
39
reduce/injectAggregatefoldl1reduceLeftreduceaccumulatereduce
40
AggregatefoldlfoldLeftfold
41
scan
42
rejectWhere(\p -> filter (not.p) )filterNot
43
selectWhereifilterfilterfilter, withFilterfilterfilteredfilteredfilter
44
sortOrderBysortsort(deprecated),sortedsortsortedsorted
45
比較関数を取るList.sortWith / Array.sortWithsorted
46
変換関数を取るsort_bysortBysortBysortBysorted
47
takeTaketaketaketake / truncatetakenlimit
48
take_whileTakeWhiletakewhiletakeWhiletakeWhiletakeWhiletaken_while
49
to_aToArraytoArraytoArraycopy_rangecopied, memorizedtoArray
50
zipizipzipzipzipzipped, fuzipped, zippped_with
51
ZipzipWithList.map2(deprecated),zipped.mapmap2
52
foldrfoldRightList.foldBack / Array.foldBack
53
foldr1reduceRightList.reduceBack / Array.reduceBack
54
Array#shifttail
55
concatConcatchain(++)++appendjoinjoinedconcat
56
flattenSelectManyconcatflatMapconcatconcatenatedflatMap
57
SelectManyconcatMapflatMapcollect
58
Array.new(size, val)Repeatrepeatreplicatefillinit size (fun _ -> val)generation
59
Range.newまたは範囲演算子Range[a..b]a to bseq { a..b }irangecountingrange
60
Array.new(size) {|index| ... }tabulateinit
61
unfolditerateunfoldunfold
62
from
63
eachforeachiterfor_each, BOOST_FOREACHPSTADE_OVEN_FOREACHforEach
64
iteri
65
sumSumsumsumaccumulatesum
66
変換関数を取るsumBycollect(Collectors.summingInt())
67
Averageaverageaverage
68
変換関数を取るaverageBycollect(Collectors.averagingInt())
69
ElementAt(!!)applynthvalue_at
70
スライス表記?isliceslicexs.[a..b] / xs.[a..] / xs.[..b]sliced, copiedwindow, offset
71
reverse_eachArray.ReverseほかreversereverseList.rev / Array.revreversedreversedCollections.reverse
72
Array#joinmkStringString.concatdelimitedcollect(Collectors.joining())
73
tee的なものcopied_topeek
74
memorized
75
Array#uniqDistinct(map head) . Data.List.group . Data.List.sortdistinctdistinctuniqueduniqueddistinct
76
Array#permutationpermutationspermuted
77
each_with_objectscanned
78
adjacent_filteredadjacent_filtered
79
adjacent_transformed
80
rotated
81
merged
82
set_cap
83
set_cup
84
set_delta
85
set_minus
86
Hash#each_keyIDictionary<TKey, TValue>.KeysMap[A, +B]#keysmap_keysmap_keys
87
Hash#each_valueIDictionary<TKey, TValue>.ValuesMap[A, +B]#valuesmap_valuesmap_values
88
89
90
91
92
93
94
95
96
97
98
99
100