blob: 14e104560de0767f0af706bdd06a5acc4097f8d9 [file] [log] [blame]
// Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.examples.inspect;
// Implementation of the FizzBuzz (https://en.wikipedia.org/wiki/Fizz_buzz) game as a FIDL service.
[Discoverable]
protocol FizzBuzz {
// Returns the result of FizzBuzz(count), where each number i in [1, count]
// is printed as follows:
// - If the number is divisible by 3, print "Fizz" instead of the number.
// - If the number is divisible by 5, print "Buzz" instead of the number.
// - If the number is divisible by both 3 and 5, print "FizzBuzz" instead
// of the number.
// - If the number is not divisible by 3 or 5, print the number itself.
Execute(uint32 count) -> (string:1024 response);
};