# Extension help w/ functions

**URL:** https://forum.makecode.com/t/extension-help-w-functions/45566
**Category:** Help
**Tags:** extension
**Created:** [August 24, 2026, 9:50pm UTC](https://forum.makecode.com/t/extension-help-w-functions/45566 "2026-08-24T21:50:15Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![VoxelMaster64](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/voxelmaster64/32/32075_2.png) [@VoxelMaster64](https://forum.makecode.com/u/VoxelMaster64)
#### Post date: [August 24, 2026, 9:50pm UTC](https://forum.makecode.com/t/extension-help-w-functions/45566/1 "2026-08-24T21:50:15Z")

</div>

Is it possible to make a block look like (in an extension):

![.png](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/6/2/622ccc31272c3afdf87514c6d8e1c2c88083f216.png) (original:) ![.png](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/6/2/622ccc31272c3afdf87514c6d8e1c2c88083f216.png)

Basically, its 2 function parts in one block.

---

<div class="post-metadata">

### Author: ![redSprite](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/redsprite/32/34262_2.png) [@redSprite](https://forum.makecode.com/u/redSprite)
#### Post date: [August 24, 2026, 11:16pm UTC](https://forum.makecode.com/t/extension-help-w-functions/45566/2 "2026-08-24T23:16:38Z")

</div>

Why would we want this?

---

<div class="post-metadata">

### Author: ![VoxelMaster64](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/voxelmaster64/32/32075_2.png) [@VoxelMaster64](https://forum.makecode.com/u/VoxelMaster64)
#### Post date: [August 25, 2026, 2:37am UTC](https://forum.makecode.com/t/extension-help-w-functions/45566/3 "2026-08-25T02:37:29Z")

</div>

to find out which is faster, e.g. `x | 0` vs `Math.floor(x)` vs `Math.trunc(x)` vs the other 2 `Math` functions. It could be really useful for huge loops (e.g. raycasting).

---

<div class="post-metadata">

### Author: ![Sarge](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sarge/32/19590_2.png) [@Sarge](https://forum.makecode.com/u/Sarge)
#### Post date: [August 26, 2026, 3:35am UTC](https://forum.makecode.com/t/extension-help-w-functions/45566/4 "2026-08-26T03:35:27Z")

</div>

Short answer: no (I tried before)

---

<div class="post-metadata">

### Author: ![TheEarth](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/theearth/32/34579_2.png) [@TheEarth](https://forum.makecode.com/u/TheEarth)
#### Post date: [August 26, 2026, 4:30pm UTC](https://forum.makecode.com/t/extension-help-w-functions/45566/5 "2026-08-26T16:30:38Z")

</div>

just create a project that runs math floor 1000 times every frame or less and then the same for math trunc math ceiling and math round

---

<div class="post-metadata">

### Author: ![VoxelMaster64](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/voxelmaster64/32/32075_2.png) [@VoxelMaster64](https://forum.makecode.com/u/VoxelMaster64)
#### Post date: [August 27, 2026, 1:57am UTC](https://forum.makecode.com/t/extension-help-w-functions/45566/6 "2026-08-27T01:57:47Z")

</div>

im thinking maybe have a  
\_function(a: () =\> void) { return a }  
and just make the input an array, like  
 ![.png](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/9/5/95fcbf497099faedd5a0d8057fcf3e3ec8424478.png) (original:) ![.png](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/9/5/95fcbf497099faedd5a0d8057fcf3e3ec8424478.png)

would that work?

---

<div class="post-metadata">

### Author: ![VoxelMaster64](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/voxelmaster64/32/32075_2.png) [@VoxelMaster64](https://forum.makecode.com/u/VoxelMaster64)
#### Post date: [August 27, 2026, 1:57am UTC](https://forum.makecode.com/t/extension-help-w-functions/45566/7 "2026-08-27T01:57:54Z")

</div>

but I want an extension to make it easier for other users.

---

<div class="post-metadata">

### Author: ![TheEarth](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/theearth/32/34579_2.png) [@TheEarth](https://forum.makecode.com/u/TheEarth)
#### Post date: [August 27, 2026, 10:15pm UTC](https://forum.makecode.com/t/extension-help-w-functions/45566/8 "2026-08-27T22:15:53Z")

</div>

Nashe what is this jargon

---

<div class="post-metadata">

### Author: ![Sarge](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sarge/32/19590_2.png) [@Sarge](https://forum.makecode.com/u/Sarge)
#### Post date: [August 27, 2026, 10:23pm UTC](https://forum.makecode.com/t/extension-help-w-functions/45566/9 "2026-08-27T22:23:17Z")

</div>

Can’t pass functions as arguments in blocks mate

---

<div class="post-metadata">

### Author: ![VoxelMaster64](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/voxelmaster64/32/32075_2.png) [@VoxelMaster64](https://forum.makecode.com/u/VoxelMaster64)
#### Post date: [August 27, 2026, 10:42pm UTC](https://forum.makecode.com/t/extension-help-w-functions/45566/10 "2026-08-27T22:42:48Z")

</div>

moderators please edit to: “make” not “nashe”

---

<div class="post-metadata">

### Author: ![VoxelMaster64](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/voxelmaster64/32/32075_2.png) [@VoxelMaster64](https://forum.makecode.com/u/VoxelMaster64)
#### Post date: [September 19, 2026, 7:46pm UTC](https://forum.makecode.com/t/extension-help-w-functions/45566/11 "2026-09-19T19:46:57Z")

</div>

you can, but a block with a function can’t return anything.

---

<div class="post-metadata">

### Author: ![VoxelMaster64](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/voxelmaster64/32/32075_2.png) [@VoxelMaster64](https://forum.makecode.com/u/VoxelMaster64)
#### Post date: [September 19, 2026, 7:47pm UTC](https://forum.makecode.com/t/extension-help-w-functions/45566/12 "2026-09-19T19:47:17Z")

</div>

that was just an example, because I didn’t want to spoil what I was making
