 
 // MARK: - ScalarRepresentable
 /// Type is representabe as `Node.scalar`
-public protocol ScalarRepresentable: NodeRepresentable {}
+public protocol ScalarRepresentable: NodeRepresentable {
+    func represented() -> Node.Scalar
+}
+
+extension ScalarRepresentable {
+    public func represented() throws -> Node {
+        return .scalar(represented())
+    }
+}
 
 extension Bool: ScalarRepresentable {
-    public func represented() throws -> Node {
-        return Node(self ? "true" : "false", Tag(.bool))
+    public func represented() -> Node.Scalar {
+        return .init(self ? "true" : "false", Tag(.bool))
     }
 }
 
 extension Data: ScalarRepresentable {
-    public func represented() throws -> Node {
-        return Node(base64EncodedString(), Tag(.binary))
+    public func represented() -> Node.Scalar {
+        return .init(base64EncodedString(), Tag(.binary))
     }
 }
 
 extension Date: ScalarRepresentable {
-    public func represented() throws -> Node {
-        return Node(iso8601String, Tag(.timestamp))
+    public func represented() -> Node.Scalar {
+        return .init(iso8601String, Tag(.timestamp))
     }
 
     private var iso8601String: String {

//extension Float80: ScalarRepresentable {}

extension BinaryInteger {
    public func represented() throws -> Node {
        return Node(String(describing: self), Tag(.int))
    }
}


}

extension Decimal: ScalarRepresentable {
    public func represented() -> Node.Scalar {
        return .init(description)
    }
}

extension URL: ScalarRepresentable {
    public func represented() -> Node.Scalar {
        return .init(absoluteString)
    }
}

extension String: ScalarRepresentable {
    public func represented() -> Node.Scalar {
        return .init(self)
    }
}

