diff options
author | Louis Pilfold <louis@lpil.uk> | 2018-08-09 16:43:35 +0100 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2018-08-09 16:46:41 +0100 |
commit | 012273c4186317171f3405cc794ff9b3085c0e39 (patch) | |
tree | 838960bc358f3ba8fdb12c0f2a9bf493694e5017 /src/Foreign.gleam | |
parent | 817d9006dd4aaa1793fee68089ef53f9e188af3f (diff) | |
download | gleam_stdlib-012273c4186317171f3405cc794ff9b3085c0e39.tar.gz gleam_stdlib-012273c4186317171f3405cc794ff9b3085c0e39.zip |
Unify function and closure syntax
I feel the `|x| x` syntax is less obvious than the `fn name(x) { x }`
syntax used by top level named functions. Using the same syntax
everywhere should be clearer.
Diffstat (limited to 'src/Foreign.gleam')
-rw-r--r-- | src/Foreign.gleam | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Foreign.gleam b/src/Foreign.gleam index ccd71f4..1be59d0 100644 --- a/src/Foreign.gleam +++ b/src/Foreign.gleam @@ -12,7 +12,7 @@ external type Foreign doc """ Convert any Gleam data into Foreign data. """ -external new : |a| -> Foreign = :gleam.identity +external new : fn(a) { Foreign } = :gleam :identity doc """ Unsafely cast any type into any other type.o @@ -20,4 +20,4 @@ Unsafely cast any type into any other type.o This is an escape hatch for the type system that may be useful when wrapping native Erlang APIs. It is to be used as a last measure only. """ -external unsafeCoerce : |a| -> b = :gleam.identity +external unsafeCoerce : fn(a) { b } = :gleam :identity |