Grease an 8 x 4 x 4 -inch loaf pan with the 2 teaspoons cooking oil or melted butter. Add the cranberries, 1/4 cup sugar and the nuts to the loaf pan. Beat 1/2 cup sugar, 1/4 cup melted butter and egg until smooth. Fold in flour and pour mixture over berries. Bake for 45 minutes.