Apply a callback to an array: Difference between revisions
Content added Content deleted
(Added XBS language) |
Puppydrum64 (talk | contribs) |
||
Line 3,680: | Line 3,680: | ||
MapSingle({{x}, x^2}, {1,2,3,4}) |
MapSingle({{x}, x^2}, {1,2,3,4}) |
||
</lang> |
</lang> |
||
=={{header|Z80 Assembly}}== |
|||
<lang z80>Array: |
|||
byte &01,&02,&03,&04,&05 |
|||
Array_End: |
|||
foo: |
|||
ld hl,Array |
|||
ld b,Array_End-Array ;ld b,5 |
|||
bar: |
|||
inc (hl) |
|||
inc (hl) |
|||
inc (hl) |
|||
inc hl ;next entry in array |
|||
djnz bar</lang> |
|||
{{out}} |
|||
The program above doesn't show the new values but here they are: |
|||
<pre> |
|||
&04,&05,&06,&07,&08 |
|||
</pre> |
|||
=={{header|zkl}}== |
=={{header|zkl}}== |