# Subarray not in array module anymore?

**URL:** https://forum.dfinity.org/t/subarray-not-in-array-module-anymore/20476
**Category:** Developers
**Created:** [June 6, 2023, 4:47am UTC](https://forum.dfinity.org/t/subarray-not-in-array-module-anymore/20476 "2023-06-06T04:47:59Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Iceypee](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/iceypee/32/5362_2.png) [@Iceypee](https://forum.dfinity.org/u/Iceypee)
#### Post date: [June 6, 2023, 4:47am UTC](https://forum.dfinity.org/t/subarray-not-in-array-module-anymore/20476/1 "2023-06-06T04:47:59Z")

</div>

Is there a reason why subarray isnt in the array base module anymore? And does anyone have a good method of how that was implemented? I have a method but idk it seems to eat lots of cycles.

---

<div class="post-metadata">

### Author: ![matthewhammer](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/matthewhammer/32/323_2.png) [@matthewhammer](https://forum.dfinity.org/u/matthewhammer)
#### Post date: [June 6, 2023, 2:24pm UTC](https://forum.dfinity.org/t/subarray-not-in-array-module-anymore/20476/2 "2023-06-06T14:24:47Z")

</div>

Seems to still be there?

> <https://github.com/dfinity/motoko-base/blob/3627b49f754bca8444da12c1e12e7c7d534efdd5/src/Array.mo#L728>

---

<div class="post-metadata">

### Author: ![Iceypee](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/iceypee/32/5362_2.png) [@Iceypee](https://forum.dfinity.org/u/Iceypee)
#### Post date: [June 6, 2023, 7:06pm UTC](https://forum.dfinity.org/t/subarray-not-in-array-module-anymore/20476/3 "2023-06-06T19:06:13Z")

</div>

Heres the error

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/4/467c659523248064037ffbb8e1b97032a384ffae.png)

Heres the code

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/7/73534017c4ad318c9657ee8b66e5d59a33073093.png)

I’m using dfx 13.1. Is it just mine?

I did something in my package-set. Could this be causing it?

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/9/9242dac6d4e9319dcfad107f15d2e2242fa493fe.png)

---

<div class="post-metadata">

### Author: ![Iceypee](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/iceypee/32/5362_2.png) [@Iceypee](https://forum.dfinity.org/u/Iceypee)
#### Post date: [June 6, 2023, 8:00pm UTC](https://forum.dfinity.org/t/subarray-not-in-array-module-anymore/20476/4 "2023-06-06T20:00:34Z")

</div>

Well I’ll leave this open as its not fully solved in terms of still being missing from my array module but thanks you helped me figured out my issue internally, I was able to just copy the prim code instead from the github code.

---

<div class="post-metadata">

### Author: ![rvanasa](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/rvanasa/32/23650_2.png) [@rvanasa](https://forum.dfinity.org/u/rvanasa)
#### Post date: [June 6, 2023, 11:02pm UTC](https://forum.dfinity.org/t/subarray-not-in-array-module-anymore/20476/5 "2023-06-06T23:02:33Z")

</div>

It looks like `Array.subArray` was added in `0.8.4`, so it should be possible to fix this by switching to a more recent base library version in your package-set. If you’re using dfx `0.14.1`, the corresponding version tag is `moc-0.8.8`.

Hope this helps!
