There was an error while loading. Please reload this page.
using Nemerle; using System; using System.Console; def data = [1, 2, 3, 4]; def result1 = data.Map(_ + 1); def result2 = data.Map(_.ToString()); def result3 = data.Map(x => (x, x)); WriteLine($"Adding '1' using map = $result1"); WriteLine($"Converting to strings using map = $result2" ); WriteLine($"Tupling up using map = $result3")
Adding '1' using map = [2, 3, 4, 5] Converting to strings using map = [1, 2, 3, 4] Tupling up using map = [(1, 1), (2, 2), (3, 3), (4, 4)]
[Copyright ©](Terms of use, legal notice)