Skip to content

Commit

Permalink
fixes after revert + updates
Browse files Browse the repository at this point in the history
  • Loading branch information
radeusgd committed Feb 13, 2024
1 parent f29f313 commit 32ecd32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
4 changes: 2 additions & 2 deletions distribution/lib/Standard/Base/0.0.0-dev/src/Data/Array.enso
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import project.Data.Pair.Pair
import project.Data.Range.Range
import project.Data.Sort_Direction.Sort_Direction
import project.Data.Text.Text
import project.Data.Vector.Empty_Error
import project.Data.Vector.No_Wrap
import project.Data.Vector.Vector
import project.Error.Error
import project.Errors.Common.Incomparable_Values
import project.Errors.Common.Index_Out_Of_Bounds
import project.Errors.Common.Not_Found
import project.Errors.Empty_Error.Empty_Error
import project.Errors.Problem_Behavior.Problem_Behavior
import project.Errors.Unimplemented.Unimplemented
import project.Internal.Array_Like_Helpers
Expand Down Expand Up @@ -729,7 +729,7 @@ type Array

[0, 1, 2].to_array . reduce (+)
reduce : (Any -> Any -> Any) -> Any -> Any
reduce self function ~if_empty=(Error.throw Empty_Error) =
reduce self function ~if_empty=(Error.throw (Empty_Error.Error Array)) =
Array_Like_Helpers.reduce self function if_empty

## GROUP Logical
Expand Down
11 changes: 2 additions & 9 deletions distribution/lib/Standard/Base/0.0.0-dev/src/Data/Vector.enso
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import project.Errors.Common.Index_Out_Of_Bounds
import project.Errors.Common.No_Such_Method
import project.Errors.Common.Not_Found
import project.Errors.Common.Type_Error
import project.Errors.Empty_Error.Empty_Error
import project.Errors.Illegal_Argument.Illegal_Argument
import project.Errors.Problem_Behavior.Problem_Behavior
import project.Errors.Wrapped_Error.Wrapped_Error
Expand Down Expand Up @@ -300,7 +301,7 @@ type Vector a

[0, 1, 2] . reduce (+)
reduce : (Any -> Any -> Any) -> Any -> Any
reduce self function ~if_empty=(Error.throw Empty_Error) =
reduce self function ~if_empty=(Error.throw (Empty_Error.Error Vector)) =
Array_Like_Helpers.reduce self function if_empty

## GROUP Selections
Expand Down Expand Up @@ -1301,11 +1302,3 @@ type No_Wrap

## PRIVATE
Wrapped_Error.from (that : Map_Error) = Wrapped_Error.Value that that.inner_error

## PRIVATE
An error that indicates that the vector is empty.
type Empty_Error
## PRIVATE
Pretty prints the empty error.
to_display_text : Text
to_display_text self = "The vector is empty."

0 comments on commit 32ecd32

Please sign in to comment.