# Is it not possible to return from a loop expression within a failable function?

**URL:** <https://forums.unrealengine.com/t/is-it-not-possible-to-return-from-a-loop-expression-within-a-failable-function/1842120>\
**Category:** Programming & Scripting\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [May 6, 2024, 1:42am UTC](https://forums.unrealengine.com/t/is-it-not-possible-to-return-from-a-loop-expression-within-a-failable-function/1842120 "2024-05-06T01:42:35Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![t.tutiya](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/t.tutiya/32/924637_2.png) [@t.tutiya](https://forums.unrealengine.com/u/t.tutiya)\
**Post date:** [May 6, 2024, 5:02am UTC](https://forums.unrealengine.com/t/is-it-not-possible-to-return-from-a-loop-expression-within-a-failable-function/1842120/3 "2024-05-06T05:02:46Z")

</div>

Sorry, the issue has already been mentioned.

> [@Has anyone successfully written a failable function in Verse?](https://forums.unrealengine.com/t/has-anyone-successfully-written-a-failable-function-in-verse/1160379/3):
>
> You can’t return explicitly from a failable context. So that stops you from using return Y false? always fails, without returning any value. However, right now the compiler still wants to see the function return a value of its return type (int) since it can’t infer that anything after false? won’t execute. You could wrap this in an option: Find(X:[]int, F(:int)\<transacts\>\<decides\>:void)\<transacts\>\<decides\>:int = var RetInt:?int = false for (Y:X, F[Y], not RetInt?): set RetIn…

---

_[View the full topic](https://forums.unrealengine.com/t/is-it-not-possible-to-return-from-a-loop-expression-within-a-failable-function/1842120)._
