Using the Set type - vilinski/nemerle GitHub Wiki

Using the Set type

  • Category: Data Types

  • Description: Create a set of particular unicode characters using a Nemerle.Collections.Set.

  • Code:

using Nemerle.Collections;
using System;
using System.Console;

def SampleSet1() 
{
	def data = "The big black bird flying over the moon";
	def set = Set().ReplaceRange(data);
	forech (x in set)
		WriteLine($"Char : '$x'")
}

SampleSet1() 
  • Execution Result:
Char : ''
Char : 'T' 
Char : 'a' 
Char : 'b' 
Char : 'c' 
Char : 'd' 
Char : 'e' 
Char : 'f' 
Char : 'g' 
Char : 'h' 
Char : 'i' 
Char : 'k'
Char : 'l' 
Char : 'm' 
Char : 'n' 
Char : 'o' 
Char : 'r' 
Char : 't' 
Char : 'v' 
Char : 'y' 

[Copyright ©](Terms of use, legal notice)