Skip to content

Commit

Permalink
new test
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Oct 2, 2024
1 parent 81f0413 commit a7b49ce
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions vlib/v/tests/generics/lamda_param_and_ret_test.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import arrays

fn test_main() {
items := ['item1', 'item2', 'item3']
list := arrays.map_indexed[string, string](items, |i, item| '${i}. ${item}')
assert list == ['0. item1', '1. item2', '2. item3']
}

0 comments on commit a7b49ce

Please sign in to comment.