Jump to content

Factors of an integer: Difference between revisions

m
Line 2,005:
=={{header|Dyalect}}==
 
<lang Dyalect>func Iterator.whereWhere(pred) {
for x in this when pred(x) {
yield x
Line 2,011:
}
 
func Integer.factorsFactors() {
(1..this).whereWhere(x => this % x == 0)
}
 
for x in 45.factorsFactors() {
print(x)
}</lang>
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.