This is a sample code adapted from several tutorials and modified extensively to allow simple communication between 2 Intel Curie Genuino modules via Bluetooth Low Energy.
This sketch implies a button conected to one Genuino 101, which will be used to toggle the on-board LED of the second Genuino 101.