Alkynes and nitriles participate as electrophiles in numerous heterocycle synthesis reactions, being attacked by a wide variety of nucleophiles.

A) The nucleophilic-electrophilic character of propanedinitrile and alpha-aminoketones allows the preparation of pyrroles , let's see an example.

pyrrole cyclization sp synthesis

B) In this second example we put into play thiourea, which reacts with alphabromonitrile yielding thiazole.

synthesis thiazole cyclization sp

C) Intramolecular cyclization in which the alcohol acts as a nucleophile and the alkyne as an electrophile.

furan synthesis sp cyclization