Skip to content

Commit

Permalink
New struct syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
lpil committed Aug 19, 2019
1 parent ab30db8 commit a270b41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions traits.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ where T: Named {
string.append("the name is:", name(n))
}

fn two_names(x: X, y: Y) -> {String, String}
fn two_names(x: X, y: Y) -> struct(String, String)
where X: Named, Y: Named {
{name(x), name(y)}
struct(name(x), name(y))
}

// Define some types that implement the trait
Expand Down

0 comments on commit a270b41

Please sign in to comment.