cocoa :: foundation
The Foundation Kit provides basic Objective-C classes and structurescore :: union_find
union–find algorithm using an efficient disjoint-set data structure
# Simple message box using the Cocoa framework
module cocoa_message_box is example
import cocoa
in "ObjC" `{
#import <AppKit/AppKit.h>
`}
private fun dialog in "ObjC" `{
NSAlert *alert = [[[NSAlert alloc] init] autorelease];
[alert setMessageText:@"Hello world!"];
[alert runModal];
`}
if "NIT_TESTING".environ != "true" then dialog
lib/cocoa/examples/cocoa_message_box.nit:17,1--32,46