Catamorphism: Difference between revisions

Content added Content deleted
(Added uBasic/4tH version)
Line 2,835: Line 2,835:
Print "Maximum is : "; FUNC(_reduce(0, 4, _max))
Print "Maximum is : "; FUNC(_reduce(0, 4, _max))
Print "Minimum is : "; FUNC(_reduce(0, 4, _min))
Print "Minimum is : "; FUNC(_reduce(0, 4, _min))
Print "No op is : "; FUNC(_reduce(0, 4, 0))
Print "No op is : "; FUNC(_reduce(0, 4, _noop))
End
End


Line 2,842: Line 2,842:
Local (2)
Local (2)


If (c@ = 0) + ((b@ - a@) < 1) Then Return (0)
If (Line(c@) = 0) + ((b@ - a@) < 1) Then Return (0)
d@ = @(a@)
d@ = @(a@)
For e@ = a@ + 1 To b@
For e@ = a@ + 1 To b@