core :: union_find
union–find algorithm using an efficient disjoint-set data structurecocoa :: foundation
The Foundation Kit provides basic Objective-C classes and structures
# The Application Kit provides services to create GUI
module app_kit is ldflags "-framework AppKit"
import foundation
in "ObjC Header" `{
#import <AppKit/AppKit.h>
`}
# A simple message box
extern class NSAlert in "ObjC" `{ NSAlert * `}
super NSObject
# Allocate and instanciate a new `NSAlert`
new in "ObjC" `{ return [[NSAlert alloc] init]; `}
# Set the content of this message box
fun message_text=(text: NSString) in "ObjC" `{ [self setMessageText:text]; `}
# Show this message box
fun run_modal in "ObjC" `{ [self runModal]; `}
end
lib/cocoa/app_kit.nit:17,1--38,3